diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-05-27 12:27:51 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-05-28 21:00:43 +0200 |
commit | 84597b1f9b051ff75a3471c0331b6875e94b1f7e (patch) | |
tree | e64951590eab9171a120918cb44dc18f770bffa6 /fs/f2fs/namei.c | |
parent | f2fs: protect new segment allocation in expand_inode_data (diff) | |
download | linux-84597b1f9b051ff75a3471c0331b6875e94b1f7e.tar.xz linux-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.c | 3 |
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); |