Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nilfs2: convert nilfs_page_count_clean_buffers() to take a folio

Both callers have a folio, so pass it in and use it directly.

[konishi.ryusuke@gmail.com: fixed a checkpatch warning about function declaration]
Link: https://lkml.kernel.org/r/20241002150036.1339475-3-willy@infradead.org
Link: https://lkml.kernel.org/r/20241024092602.13395-11-konishi.ryusuke@gmail.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
c1d73eb8 31029320

+6 -6
+1 -1
fs/nilfs2/dir.c
··· 95 95 unsigned int nr_dirty; 96 96 int err; 97 97 98 - nr_dirty = nilfs_page_count_clean_buffers(&folio->page, from, to); 98 + nr_dirty = nilfs_page_count_clean_buffers(folio, from, to); 99 99 copied = block_write_end(NULL, mapping, pos, len, len, folio, NULL); 100 100 if (pos + copied > dir->i_size) 101 101 i_size_write(dir, pos + copied);
+1 -1
fs/nilfs2/inode.c
··· 242 242 unsigned int nr_dirty; 243 243 int err; 244 244 245 - nr_dirty = nilfs_page_count_clean_buffers(&folio->page, start, 245 + nr_dirty = nilfs_page_count_clean_buffers(folio, start, 246 246 start + copied); 247 247 copied = generic_write_end(file, mapping, pos, len, copied, folio, 248 248 fsdata);
+2 -2
fs/nilfs2/page.c
··· 422 422 __nilfs_clear_folio_dirty(folio); 423 423 } 424 424 425 - unsigned int nilfs_page_count_clean_buffers(struct page *page, 425 + unsigned int nilfs_page_count_clean_buffers(struct folio *folio, 426 426 unsigned int from, unsigned int to) 427 427 { 428 428 unsigned int block_start, block_end; 429 429 struct buffer_head *bh, *head; 430 430 unsigned int nc = 0; 431 431 432 - for (bh = head = page_buffers(page), block_start = 0; 432 + for (bh = head = folio_buffers(folio), block_start = 0; 433 433 bh != head || !block_start; 434 434 block_start = block_end, bh = bh->b_this_page) { 435 435 block_end = block_start + bh->b_size;
+2 -2
fs/nilfs2/page.h
··· 43 43 void nilfs_copy_back_pages(struct address_space *, struct address_space *); 44 44 void nilfs_clear_folio_dirty(struct folio *folio); 45 45 void nilfs_clear_dirty_pages(struct address_space *mapping); 46 - unsigned int nilfs_page_count_clean_buffers(struct page *, unsigned int, 47 - unsigned int); 46 + unsigned int nilfs_page_count_clean_buffers(struct folio *folio, 47 + unsigned int from, unsigned int to); 48 48 unsigned long nilfs_find_uncommitted_extent(struct inode *inode, 49 49 sector_t start_blk, 50 50 sector_t *blkoff);