Skip to contentSkip to conversation

f2fs: detect error of update_dent_inode in ->rename

PATCH New Chao Yu 1 participant 1 message Feb 17, 2016 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/2 f2fs: detect error of update_dent_inode in ->rename

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

---
 fs/f2fs/namei.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/f2fs/namei.c +3 -2
index 6f944e5..99ed009 100644
@@ -654,8 +654,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;
 		}
Signature · 1 line
2.7.0