summaryrefslogtreecommitdiff
path: root/fs/nfsd/filecache.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-07-08 21:26:43 +0300
committerChuck Lever <chuck.lever@oracle.com>2022-07-30 03:15:54 +0300
commitbe0230069fcbf7d332d010b57c1d0cfd623a84d6 (patch)
treeca3e18568ca3b4d2969da473c2990114608076a5 /fs/nfsd/filecache.c
parent0ec8e9d1539a7b8109a554028bbce441052f847e (diff)
downloadlinux-be0230069fcbf7d332d010b57c1d0cfd623a84d6.tar.xz
NFSD: Separate tracepoints for acquire and create
These tracepoints collect different information: the create case does not open a file, so there's no nf_file available. 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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index bfa4df7daff3..df54f882752c 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -1040,7 +1040,7 @@ nfsd_file_is_cached(struct inode *inode)
}
static __be32
-nfsd_do_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
+nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
unsigned int may_flags, struct nfsd_file **pnf, bool open)
{
struct nfsd_file_lookup_key key = {
@@ -1121,7 +1121,8 @@ out:
out_status:
put_cred(key.cred);
- trace_nfsd_file_acquire(rqstp, key.inode, may_flags, nf, status);
+ if (open)
+ trace_nfsd_file_acquire(rqstp, key.inode, may_flags, nf, status);
return status;
open_file:
@@ -1169,7 +1170,7 @@ __be32
nfsd_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
unsigned int may_flags, struct nfsd_file **pnf)
{
- return nfsd_do_file_acquire(rqstp, fhp, may_flags, pnf, true);
+ return nfsd_file_do_acquire(rqstp, fhp, may_flags, pnf, true);
}
/**
@@ -1186,7 +1187,7 @@ __be32
nfsd_file_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
unsigned int may_flags, struct nfsd_file **pnf)
{
- return nfsd_do_file_acquire(rqstp, fhp, may_flags, pnf, false);
+ return nfsd_file_do_acquire(rqstp, fhp, may_flags, pnf, false);
}
/*