Commit 1069bbf7 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: check return value of f2fs_readpage in find_data_page

We should return error if we do not get an updated page in find_date_page
when f2fs_readpage failed.
Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 01d2d1aa
...@@ -240,6 +240,9 @@ struct page *find_data_page(struct inode *inode, pgoff_t index, bool sync) ...@@ -240,6 +240,9 @@ struct page *find_data_page(struct inode *inode, pgoff_t index, bool sync)
err = f2fs_readpage(sbi, page, dn.data_blkaddr, err = f2fs_readpage(sbi, page, dn.data_blkaddr,
sync ? READ_SYNC : READA); sync ? READ_SYNC : READA);
if (err)
return ERR_PTR(err);
if (sync) { if (sync) {
wait_on_page_locked(page); wait_on_page_locked(page);
if (!PageUptodate(page)) { if (!PageUptodate(page)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment