Skip to content

Commit 2ac0aa3

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: convert f2fs_write_data_page() to use folio
Convert to use folio, so that we can get rid of 'page->index' to prepare for removal of 'index' field in structure page [1]. [1] https://lore.kernel.org/all/[email protected]/ Cc: Matthew Wilcox <[email protected]> Signed-off-by: Chao Yu <[email protected]> Reviewed-by: Li Zetao <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent bcf4d2d commit 2ac0aa3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fs/f2fs/data.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2945,22 +2945,23 @@ int f2fs_write_single_data_page(struct folio *folio, int *submitted,
29452945
static int f2fs_write_data_page(struct page *page,
29462946
struct writeback_control *wbc)
29472947
{
2948+
struct folio *folio = page_folio(page);
29482949
#ifdef CONFIG_F2FS_FS_COMPRESSION
2949-
struct inode *inode = page->mapping->host;
2950+
struct inode *inode = folio->mapping->host;
29502951

29512952
if (unlikely(f2fs_cp_error(F2FS_I_SB(inode))))
29522953
goto out;
29532954

29542955
if (f2fs_compressed_file(inode)) {
2955-
if (f2fs_is_compressed_cluster(inode, page->index)) {
2956-
redirty_page_for_writepage(wbc, page);
2956+
if (f2fs_is_compressed_cluster(inode, folio->index)) {
2957+
folio_redirty_for_writepage(wbc, folio);
29572958
return AOP_WRITEPAGE_ACTIVATE;
29582959
}
29592960
}
29602961
out:
29612962
#endif
29622963

2963-
return f2fs_write_single_data_page(page_folio(page), NULL, NULL, NULL,
2964+
return f2fs_write_single_data_page(folio, NULL, NULL, NULL,
29642965
wbc, FS_DATA_IO, 0, true);
29652966
}
29662967

0 commit comments

Comments
 (0)