diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-25 23:29:11 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-03 03:05:18 +0200 |
commit | 42d964016e2760d75144f41cc78ad8bdca8dc240 (patch) | |
tree | cf756698813e7d039c6bd6cb98f505f8b58351ef /fs/f2fs/inline.c | |
parent | f2fs: remove writepages lock (diff) | |
download | linux-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.c | 4 |
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); |