Skip to content

Commit 19bbd30

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Convert __read_io_type() to take a folio
Remove the last call to page_file_mapping() as both callers can now pass in a folio. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent f58d864 commit 19bbd30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/f2fs/data.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ bool f2fs_is_cp_guaranteed(struct page *page)
7070
return false;
7171
}
7272

73-
static enum count_type __read_io_type(struct page *page)
73+
static enum count_type __read_io_type(struct folio *folio)
7474
{
75-
struct address_space *mapping = page_file_mapping(page);
75+
struct address_space *mapping = folio->mapping;
7676

7777
if (mapping) {
7878
struct inode *inode = mapping->host;
@@ -150,7 +150,7 @@ static void f2fs_finish_read_bio(struct bio *bio, bool in_task)
150150
continue;
151151
}
152152

153-
dec_page_count(F2FS_F_SB(folio), __read_io_type(&folio->page));
153+
dec_page_count(F2FS_F_SB(folio), __read_io_type(folio));
154154
folio_end_read(folio, bio->bi_status == 0);
155155
}
156156

@@ -706,7 +706,7 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
706706
wbc_account_cgroup_owner(fio->io_wbc, fio_folio, PAGE_SIZE);
707707

708708
inc_page_count(fio->sbi, is_read_io(fio->op) ?
709-
__read_io_type(&data_folio->page) : WB_DATA_TYPE(fio->page, false));
709+
__read_io_type(data_folio) : WB_DATA_TYPE(fio->page, false));
710710

711711
if (is_read_io(bio_op(bio)))
712712
f2fs_submit_read_bio(fio->sbi, bio, fio->type);

0 commit comments

Comments
 (0)