summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-07-19 08:27:47 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-07-20 14:53:19 -0700
commit91246c21b85985c48b1e1f5603e0d81161eb76a4 (patch)
tree9303cfdb30c11c74f30c4888457dc426ceeca3bf /fs/f2fs/recovery.c
parent363cad7f7e586b385c20e9925b4923683d46deb6 (diff)
downloadlinux-91246c21b85985c48b1e1f5603e0d81161eb76a4.tar.gz
linux-91246c21b85985c48b1e1f5603e0d81161eb76a4.tar.bz2
linux-91246c21b85985c48b1e1f5603e0d81161eb76a4.zip
f2fs: fix to report error number of f2fs_find_entry
This patch fixes to report the right error number of f2fs_find_entry to its caller. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index a39d84ab66b2..5d4461f2c266 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -153,9 +153,12 @@ retry:
f2fs_delete_entry(de, page, dir, einode);
iput(einode);
goto retry;
+ } else if (IS_ERR(page)) {
+ err = PTR_ERR(page);
+ } else {
+ err = __f2fs_add_link(dir, &name, inode,
+ inode->i_ino, inode->i_mode);
}
- err = __f2fs_add_link(dir, &name, inode, inode->i_ino, inode->i_mode);
-
goto out;
out_unmap_put: