mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
UPSTREAM: 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/Zp8fgUSIBGQ1TN0D@casper.infradead.org/
Cc: Matthew Wilcox <willy@infradead.org>
Change-Id: Ia4fdfcc6a8f004fe74f5548c5c9ff89f330674f7
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 763a0dc792
)
This commit is contained in:
parent
8a40506fc4
commit
fe2ff89b78
|
@ -99,7 +99,7 @@ repeat:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(!PageUptodate(page))) {
|
if (unlikely(!PageUptodate(page))) {
|
||||||
f2fs_handle_page_eio(sbi, page->index, META);
|
f2fs_handle_page_eio(sbi, page_folio(page), META);
|
||||||
f2fs_put_page(page, 1);
|
f2fs_put_page(page, 1);
|
||||||
return ERR_PTR(-EIO);
|
return ERR_PTR(-EIO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4672,9 +4672,11 @@ static inline void f2fs_io_schedule_timeout(long timeout)
|
||||||
io_schedule_timeout(timeout);
|
io_schedule_timeout(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void f2fs_handle_page_eio(struct f2fs_sb_info *sbi, pgoff_t ofs,
|
static inline void f2fs_handle_page_eio(struct f2fs_sb_info *sbi,
|
||||||
enum page_type type)
|
struct folio *folio, enum page_type type)
|
||||||
{
|
{
|
||||||
|
pgoff_t ofs = folio->index;
|
||||||
|
|
||||||
if (unlikely(f2fs_cp_error(sbi)))
|
if (unlikely(f2fs_cp_error(sbi)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1492,7 +1492,7 @@ out_err:
|
||||||
out_put_err:
|
out_put_err:
|
||||||
/* ENOENT comes from read_node_page which is not an error. */
|
/* ENOENT comes from read_node_page which is not an error. */
|
||||||
if (err != -ENOENT)
|
if (err != -ENOENT)
|
||||||
f2fs_handle_page_eio(sbi, page->index, NODE);
|
f2fs_handle_page_eio(sbi, page_folio(page), NODE);
|
||||||
f2fs_put_page(page, 1);
|
f2fs_put_page(page, 1);
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user