Skip to content

Commit 84597b1

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: fix wrong value of tracepoint parameter
In f2fs_lookup(), we should set @err correctly before printing it in tracepoint. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent fd61264 commit 84597b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/namei.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
504504
err = PTR_ERR(page);
505505
goto out;
506506
}
507+
err = -ENOENT;
507508
goto out_splice;
508509
}
509510

@@ -549,7 +550,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
549550
#endif
550551
new = d_splice_alias(inode, dentry);
551552
err = PTR_ERR_OR_ZERO(new);
552-
trace_f2fs_lookup_end(dir, dentry, ino, err);
553+
trace_f2fs_lookup_end(dir, dentry, ino, !new ? -ENOENT : err);
553554
return new;
554555
out_iput:
555556
iput(inode);

0 commit comments

Comments
 (0)