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_mdt_write_page() to use a folio

Convert the incoming page to a folio. Replaces three calls to
compound_head() with one.

Link: https://lkml.kernel.org/r/20231114084436.2755-8-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
021cff9d b7ef8d3b

+7 -6
+7 -6
fs/nilfs2/mdt.c
··· 399 399 static int 400 400 nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc) 401 401 { 402 - struct inode *inode = page->mapping->host; 402 + struct folio *folio = page_folio(page); 403 + struct inode *inode = folio->mapping->host; 403 404 struct super_block *sb; 404 405 int err = 0; 405 406 ··· 408 407 /* 409 408 * It means that filesystem was remounted in read-only 410 409 * mode because of error or metadata corruption. But we 411 - * have dirty pages that try to be flushed in background. 412 - * So, here we simply discard this dirty page. 410 + * have dirty folios that try to be flushed in background. 411 + * So, here we simply discard this dirty folio. 413 412 */ 414 413 nilfs_clear_dirty_page(page, false); 415 - unlock_page(page); 414 + folio_unlock(folio); 416 415 return -EROFS; 417 416 } 418 417 419 - redirty_page_for_writepage(wbc, page); 420 - unlock_page(page); 418 + folio_redirty_for_writepage(wbc, folio); 419 + folio_unlock(folio); 421 420 422 421 if (!inode) 423 422 return 0;