From: Chao Yu Date: Wed, 17 Feb 2016 08:45:44 +0000 (+0800) Subject: f2fs: detect error of update_dent_inode in ->rename X-Git-Tag: v4.14-rc1~3584^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9def1e9216acb56135f264d7840c8008c3655536;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index fcc8c26..a776ade 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -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; }