Skip to contentSkip to conversation

f2fs: make trace enter and end in pairs for unlink

PATCH In review Lihong Kou 2 participants 2 messages Jun 20, 2020 F2FS file system

lore
Share & tools
lore

Lihong Kou

author
#0 lore raw

PATCH 1/1 f2fs: make trace enter and end in pairs for unlink

In the f2fs_unlink we do not add trace end for some error paths, just add.

---
 fs/f2fs/namei.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
fs/f2fs/namei.c +6 -4
index e94e02c6580a..a15a2831d43b 100644
@@ -569,15 +569,17 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
 
 	trace_f2fs_unlink_enter(dir, dentry);
 
-	if (unlikely(f2fs_cp_error(sbi)))
-		return -EIO;
+	if (unlikely(f2fs_cp_error(sbi))) {
+		err = -EIO;
+		goto fail;
+	}
 
 	err = dquot_initialize(dir);
 	if (err)
-		return err;
+		goto fail;
 	err = dquot_initialize(inode);
 	if (err)
-		return err;
+		goto fail;
 
 	de = f2fs_find_entry(dir, &dentry->d_name, &page);
 	if (!de) {
Signature · 8 lines
2.17.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel