diff options
author | Chao Yu <chao2.yu@samsung.com> | 2013-11-28 02:43:43 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-22 20:18:04 -0500 |
commit | 1069bbf7b963d31d5532c36d43a02b0447e5bcfa (patch) | |
tree | bc5587e5cabb63b30b3aed9f0624e9185b6bbde8 /fs/f2fs/data.c | |
parent | 01d2d1aa0648192fd1d49f7d74d7e8b85b1c585a (diff) |
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 <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
240 | 240 | ||
241 | err = f2fs_readpage(sbi, page, dn.data_blkaddr, | 241 | err = f2fs_readpage(sbi, page, dn.data_blkaddr, |
242 | sync ? READ_SYNC : READA); | 242 | sync ? READ_SYNC : READA); |
243 | if (err) | ||
244 | return ERR_PTR(err); | ||
245 | |||
243 | if (sync) { | 246 | if (sync) { |
244 | wait_on_page_locked(page); | 247 | wait_on_page_locked(page); |
245 | if (!PageUptodate(page)) { | 248 | if (!PageUptodate(page)) { |