diff options
author | Chao Yu <chao2.yu@samsung.com> | 2016-02-17 16:45:44 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-02-22 21:39:57 -0800 |
commit | 9def1e9216acb56135f264d7840c8008c3655536 (patch) | |
tree | a5b2fb88f6f2f85c5cc87c0e11e0a2e571d14306 /fs/f2fs | |
parent | 984ec63c5a82a07ad4490ecc69bebacd23f6fa64 (diff) | |
download | op-kernel-dev-9def1e9216acb56135f264d7840c8008c3655536.zip op-kernel-dev-9def1e9216acb56135f264d7840c8008c3655536.tar.gz |
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |