f2fs: detect error of update_dent_inode in ->rename

Should check and show correct return value of update_dent_inode in
->rename.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2016-02-17 16:45:44 +08:00 committed by Jaegeuk Kim
parent 984ec63c5a
commit 9def1e9216
1 changed files with 3 additions and 2 deletions

View File

@ -658,8 +658,9 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
if (err)
goto put_out_dir;
if (update_dent_inode(old_inode, new_inode,
&new_dentry->d_name)) {
err = update_dent_inode(old_inode, new_inode,
&new_dentry->d_name);
if (err) {
release_orphan_inode(sbi);
goto put_out_dir;
}