summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inline.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-05-25 23:29:11 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2016-06-03 03:05:18 +0200
commit42d964016e2760d75144f41cc78ad8bdca8dc240 (patch)
treecf756698813e7d039c6bd6cb98f505f8b58351ef /fs/f2fs/inline.c
parentf2fs: remove writepages lock (diff)
downloadlinux-42d964016e2760d75144f41cc78ad8bdca8dc240.tar.xz
linux-42d964016e2760d75144f41cc78ad8bdca8dc240.zip
f2fs: propagate error given by f2fs_find_entry
If we get ENOMEM or EIO in f2fs_find_entry, we should stop right away. Otherwise, for example, we can get duplicate directory entry by ->chash and ->clevel. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r--fs/f2fs/inline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 77c9c2439993..1eb30431bf44 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -286,8 +286,10 @@ struct f2fs_dir_entry *find_in_inline_dir(struct inode *dir,
f2fs_hash_t namehash;
ipage = get_node_page(sbi, dir->i_ino);
- if (IS_ERR(ipage))
+ if (IS_ERR(ipage)) {
+ *res_page = ipage;
return NULL;
+ }
namehash = f2fs_dentry_hash(&name);