Skip to content

Commit 763a0dc

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: convert f2fs_handle_page_eio() 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]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 3981e94 commit 763a0dc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

fs/f2fs/checkpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index,
9999
}
100100

101101
if (unlikely(!PageUptodate(page))) {
102-
f2fs_handle_page_eio(sbi, page->index, META);
102+
f2fs_handle_page_eio(sbi, page_folio(page), META);
103103
f2fs_put_page(page, 1);
104104
return ERR_PTR(-EIO);
105105
}

fs/f2fs/f2fs.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4678,9 +4678,11 @@ static inline void f2fs_io_schedule_timeout(long timeout)
46784678
io_schedule_timeout(timeout);
46794679
}
46804680

4681-
static inline void f2fs_handle_page_eio(struct f2fs_sb_info *sbi, pgoff_t ofs,
4682-
enum page_type type)
4681+
static inline void f2fs_handle_page_eio(struct f2fs_sb_info *sbi,
4682+
struct folio *folio, enum page_type type)
46834683
{
4684+
pgoff_t ofs = folio->index;
4685+
46844686
if (unlikely(f2fs_cp_error(sbi)))
46854687
return;
46864688

fs/f2fs/node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
14921492
out_put_err:
14931493
/* ENOENT comes from read_node_page which is not an error. */
14941494
if (err != -ENOENT)
1495-
f2fs_handle_page_eio(sbi, page->index, NODE);
1495+
f2fs_handle_page_eio(sbi, page_folio(page), NODE);
14961496
f2fs_put_page(page, 1);
14971497
return ERR_PTR(err);
14981498
}

0 commit comments

Comments
 (0)