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_forget_buffer to use a folio

Save two hidden calls to compound_head().

Link: https://lkml.kernel.org/r/20231114084436.2755-5-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
797e25ad 3cd36212

+5 -5
+5 -5
fs/nilfs2/page.c
··· 73 73 */ 74 74 void nilfs_forget_buffer(struct buffer_head *bh) 75 75 { 76 - struct page *page = bh->b_page; 76 + struct folio *folio = bh->b_folio; 77 77 const unsigned long clear_bits = 78 78 (BIT(BH_Uptodate) | BIT(BH_Dirty) | BIT(BH_Mapped) | 79 79 BIT(BH_Async_Write) | BIT(BH_NILFS_Volatile) | ··· 81 81 82 82 lock_buffer(bh); 83 83 set_mask_bits(&bh->b_state, clear_bits, 0); 84 - if (nilfs_page_buffers_clean(page)) 85 - __nilfs_clear_page_dirty(page); 84 + if (nilfs_page_buffers_clean(&folio->page)) 85 + __nilfs_clear_page_dirty(&folio->page); 86 86 87 87 bh->b_blocknr = -1; 88 - ClearPageUptodate(page); 89 - ClearPageMappedToDisk(page); 88 + folio_clear_uptodate(folio); 89 + folio_clear_mappedtodisk(folio); 90 90 unlock_buffer(bh); 91 91 brelse(bh); 92 92 }