UPSTREAM: 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. Change-Id: I7774e6d438c7bdc800c5dcff6ef106b00e4572ff Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> (cherry picked from commit 19bbd306ddfd50a2f6cf0c3ccaaa079f22ddf4c5)
This commit is contained in:
committed by
Jaegeuk Kim
parent
f0f8e36ade
commit
efaa622aad
+4
-4
@@ -71,9 +71,9 @@ bool f2fs_is_cp_guaranteed(struct page *page)
|
||||
return false;
|
||||
}
|
||||
|
||||
static enum count_type __read_io_type(struct page *page)
|
||||
static enum count_type __read_io_type(struct folio *folio)
|
||||
{
|
||||
struct address_space *mapping = page_file_mapping(page);
|
||||
struct address_space *mapping = folio->mapping;
|
||||
|
||||
if (mapping) {
|
||||
struct inode *inode = mapping->host;
|
||||
@@ -151,7 +151,7 @@ static void f2fs_finish_read_bio(struct bio *bio, bool in_task)
|
||||
continue;
|
||||
}
|
||||
|
||||
dec_page_count(F2FS_F_SB(folio), __read_io_type(&folio->page));
|
||||
dec_page_count(F2FS_F_SB(folio), __read_io_type(folio));
|
||||
folio_end_read(folio, bio->bi_status == 0);
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
|
||||
wbc_account_cgroup_owner(fio->io_wbc, fio_folio, PAGE_SIZE);
|
||||
|
||||
inc_page_count(fio->sbi, is_read_io(fio->op) ?
|
||||
__read_io_type(&data_folio->page) : WB_DATA_TYPE(fio->page, false));
|
||||
__read_io_type(data_folio) : WB_DATA_TYPE(fio->page, false));
|
||||
|
||||
if (is_read_io(bio_op(bio)))
|
||||
f2fs_submit_read_bio(fio->sbi, bio, fio->type);
|
||||
|
||||
Reference in New Issue
Block a user