Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 049be49

Browse files
LIhongKouradcolor
authored andcommitted
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. Signed-off-by: Lihong Kou <koulihong@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 49f558e commit 049be49

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

fs/f2fs/namei.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,15 +506,17 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
506506

507507
trace_f2fs_unlink_enter(dir, dentry);
508508

509-
if (unlikely(f2fs_cp_error(sbi)))
510-
return -EIO;
509+
if (unlikely(f2fs_cp_error(sbi))) {
510+
err = -EIO;
511+
goto fail;
512+
}
511513

512514
err = dquot_initialize(dir);
513515
if (err)
514-
return err;
516+
goto fail;
515517
err = dquot_initialize(inode);
516518
if (err)
517-
return err;
519+
goto fail;
518520

519521
de = f2fs_find_entry(dir, &dentry->d_name, &page);
520522
if (!de) {

0 commit comments

Comments
 (0)