* [f2fs-dev] [PATCH 4/5] f2fs: check return value of f2fs_readpage in find_data_page
@ 2013-11-28 7:43 Chao Yu
0 siblings, 0 replies; only message in thread
From: Chao Yu @ 2013-11-28 7:43 UTC (permalink / raw)
To: ???; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, 谭姝
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>
---
fs/f2fs/data.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2d02cf3..85071d6 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)) {
--
1.7.9.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-28 7:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 7:43 [f2fs-dev] [PATCH 4/5] f2fs: check return value of f2fs_readpage in find_data_page Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome