From: Chao Yu Date: Thu, 28 Nov 2013 07:43:43 +0000 (+0800) Subject: f2fs: check return value of f2fs_readpage in find_data_page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1069bbf7b963d31d5532c36d43a02b0447e5bcfa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 24f752de6a90..c9a76f8c1028 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -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, sync ? READ_SYNC : READA); + if (err) + return ERR_PTR(err); + if (sync) { wait_on_page_locked(page); if (!PageUptodate(page)) {