aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-06-09 14:57:19 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:33:46 +0200
commit2ad368da42a51eab0c1efe3388dec5da301a2f28 (patch)
tree8dd8535faeb62e627f2d57bf3b9c13523831888e /fs
parente718efab5f02213a049308426e0eb724eb6f5f5f (diff)
f2fs: report error for f2fs_parent_dir
If there is no dentry, we can report its error correctly. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: fs/f2fs/namei.c
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/namei.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index d6d2cb9a8..4c35998cb 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -599,10 +599,11 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto out;
if (S_ISDIR(old_inode->i_mode)) {
- err = -EIO;
old_dir_entry = f2fs_parent_dir(old_inode, &old_dir_page);
- if (!old_dir_entry)
+ if (!old_dir_entry) {
+ err = PTR_ERR(old_dir_page);
goto out_old;
+ }
}
if (new_inode) {