Skip to contentSkip to conversation

nfsd: ensure we always call fh_verify_error tracepoint

PATCH Applied [email protected] 2 participants 2 messages Oct 12, 2022 – Oct 13, 2022

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 nfsd: ensure we always call fh_verify_error tracepoint

From: Jeff Layton <[email protected]>

This is a conditional tracepoint. Call it every time, not just when nfs_permission fails.

---
 fs/nfsd/nfsfh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfsfh.c +1 -1
index 9c1f697ffc72..43bb34f1458e 100644
@@ -392,8 +392,8 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access)
 skip_pseudoflavor_check:
 	/* Finally, check access permissions. */
 	error = nfsd_permission(rqstp, exp, dentry, access);
-	trace_nfsd_fh_verify_err(rqstp, fhp, type, access, error);
 out:
+	trace_nfsd_fh_verify_err(rqstp, fhp, type, access, error);
 	if (error == nfserr_stale)
 		nfsd_stats_fh_stale_inc(exp);
 	return error;
Signature · 1 line
2.37.3
#1 lore raw
Quoted 10 lines · On Oct 12, 2022, at 2:42 PM, [email protected] wrote:

From: Jeff Layton <[email protected]>

This is a conditional tracepoint. Call it every time, not just when nfs_permission fails.

I've applied this to nfsd's for-rc. Thanks!

Quoted 15 lines

---
fs/nfsd/nfsfh.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfsfh.c +0 -0
index 9c1f697ffc72..43bb34f1458e 100644
@@ -392,8 +392,8 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access)

skip_pseudoflavor_check:

	/* Finally, check access permissions. */
	error = nfsd_permission(rqstp, exp, dentry, access);
fs/nfsd/nfsfh.c +0 -1
-	trace_nfsd_fh_verify_err(rqstp, fhp, type, access, error);

out:

fs/nfsd/nfsfh.c +1 -0
+	trace_nfsd_fh_verify_err(rqstp, fhp, type, access, error);
Quoted 6 lines
	if (error == nfserr_stale)
		nfsd_stats_fh_stale_inc(exp);
	return error;
Signature · 1 line
2.37.3

--
Chuck Lever