summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-12-24 18:04:56 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-12-30 10:14:15 -0800
commit6d5a1495eebd441216dc96913a4270100b26e104 (patch)
tree022b4f030f96c4411c18aee53e491dd622f0e22f /fs/f2fs/node.c
parentd53841740fd7feec170339203b198020ff100c58 (diff)
downloadlinux-6d5a1495eebd441216dc96913a4270100b26e104.tar.bz2
f2fs: let user being aware of IO error
Sometimes we keep dumb when IO error occur in lower layer device, so user will not receive any error return value for some operation, but actually, the operation did not succeed. This sould be avoided, so this patch reports such kind of error to user. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 929265d20c32..94d9753f8c53 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1189,6 +1189,11 @@ next_step:
for (i = 0; i < nr_pages; i++) {
struct page *page = pvec.pages[i];
+ if (unlikely(f2fs_cp_error(sbi))) {
+ pagevec_release(&pvec);
+ return -EIO;
+ }
+
/*
* flushing sequence with step:
* 0. indirect nodes