diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-12-24 11:04:56 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-30 19:14:15 +0100 |
commit | 6d5a1495eebd441216dc96913a4270100b26e104 (patch) | |
tree | 022b4f030f96c4411c18aee53e491dd622f0e22f /fs/f2fs/file.c | |
parent | f2fs: add missing f2fs_balance_fs in __recover_dot_dentries (diff) | |
download | linux-6d5a1495eebd441216dc96913a4270100b26e104.tar.xz linux-6d5a1495eebd441216dc96913a4270100b26e104.zip |
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/file.c')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 780db8bd2451..2d87a3cf6768 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -259,8 +259,10 @@ sync_nodes: sync_node_pages(sbi, ino, &wbc); /* if cp_error was enabled, we should avoid infinite loop */ - if (unlikely(f2fs_cp_error(sbi))) + if (unlikely(f2fs_cp_error(sbi))) { + ret = -EIO; goto out; + } if (need_inode_block_update(sbi, ino)) { mark_inode_dirty_sync(inode); |