summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-11-05 19:35:26 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-11-05 19:58:41 +0300
commit4798f8058d6b6bcfaedf5560fc28a83f404cbb57 (patch)
tree5b0c0ddcaa07c1a4486890bda2b9e67ad2bbf37d
parent3be232f11a3cc9b0ef0795e39fa11bdb8e422a06 (diff)
downloadlinux-4798f8058d6b6bcfaedf5560fc28a83f404cbb57.tar.xz
NFS: Don't trace an uninitialised value
If fhandle is NULL or fattr is NULL, then 'error' is uninitialised. Reported-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 210c5945ac2b..36cb1012c7e1 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1814,7 +1814,7 @@ no_entry:
}
nfs_set_verifier(dentry, dir_verifier);
out_label:
- trace_nfs_lookup_exit(dir, dentry, flags, error);
+ trace_nfs_lookup_exit(dir, dentry, flags, PTR_ERR_OR_ZERO(res));
nfs4_label_free(label);
out:
nfs_free_fattr(fattr);