summaryrefslogtreecommitdiff
path: root/fs/nfsd/filecache.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-07-08 14:26:49 -0400
committerChuck Lever <chuck.lever@oracle.com>2022-07-29 20:16:07 -0400
commitb40a2839470cd62ed68c4a32d72a18ee8975b1ac (patch)
tree5fa4827b0bcbcebd1d278045864f78e34830cffe /fs/nfsd/filecache.c
parentbe0230069fcbf7d332d010b57c1d0cfd623a84d6 (diff)
downloadlwn-b40a2839470cd62ed68c4a32d72a18ee8975b1ac.tar.gz
lwn-b40a2839470cd62ed68c4a32d72a18ee8975b1ac.zip
NFSD: Move nfsd_file_trace_alloc() tracepoint
Avoid recording the allocation of an nfsd_file item that is immediately released because a matching item was already inserted in the hash. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/filecache.c')
-rw-r--r--fs/nfsd/filecache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index df54f882752c..ac38b41c89c6 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -303,7 +303,6 @@ nfsd_file_alloc(struct nfsd_file_lookup_key *key, unsigned int may)
refcount_set(&nf->nf_ref, 2);
nf->nf_may = key->need;
nf->nf_mark = NULL;
- trace_nfsd_file_alloc(nf);
}
return nf;
}
@@ -1126,6 +1125,7 @@ out_status:
return status;
open_file:
+ trace_nfsd_file_alloc(nf);
nf->nf_mark = nfsd_file_mark_find_or_create(nf);
if (nf->nf_mark) {
if (open) {