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_writepage() 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-7-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
b7ef8d3b 36319c0c

+5 -4
+5 -4
fs/nilfs2/inode.c
··· 175 175 176 176 static int nilfs_writepage(struct page *page, struct writeback_control *wbc) 177 177 { 178 - struct inode *inode = page->mapping->host; 178 + struct folio *folio = page_folio(page); 179 + struct inode *inode = folio->mapping->host; 179 180 int err; 180 181 181 182 if (sb_rdonly(inode->i_sb)) { ··· 187 186 * So, here we simply discard this dirty page. 188 187 */ 189 188 nilfs_clear_dirty_page(page, false); 190 - unlock_page(page); 189 + folio_unlock(folio); 191 190 return -EROFS; 192 191 } 193 192 194 - redirty_page_for_writepage(wbc, page); 195 - unlock_page(page); 193 + folio_redirty_for_writepage(wbc, folio); 194 + folio_unlock(folio); 196 195 197 196 if (wbc->sync_mode == WB_SYNC_ALL) { 198 197 err = nilfs_construct_segment(inode->i_sb);