summaryrefslogtreecommitdiff
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-05-27 18:27:51 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-05-28 12:00:43 -0700
commit84597b1f9b051ff75a3471c0331b6875e94b1f7e (patch)
treee64951590eab9171a120918cb44dc18f770bffa6 /fs/f2fs/namei.c
parentfd6126484ceaa9d94db196931c10454090f3d677 (diff)
downloadlinux-rpi-84597b1f9b051ff75a3471c0331b6875e94b1f7e.tar.gz
linux-rpi-84597b1f9b051ff75a3471c0331b6875e94b1f7e.tar.bz2
linux-rpi-84597b1f9b051ff75a3471c0331b6875e94b1f7e.zip
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 <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 8f55201441f7..e94e02c6580a 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -504,6 +504,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
err = PTR_ERR(page);
goto out;
}
+ err = -ENOENT;
goto out_splice;
}
@@ -549,7 +550,7 @@ out_splice:
#endif
new = d_splice_alias(inode, dentry);
err = PTR_ERR_OR_ZERO(new);
- trace_f2fs_lookup_end(dir, dentry, ino, err);
+ trace_f2fs_lookup_end(dir, dentry, ino, !new ? -ENOENT : err);
return new;
out_iput:
iput(inode);