]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
NFS: remove redundant __private attribute from nfs_page_class
authorSean Chang <seanwascoding@gmail.com>
Sun, 19 Apr 2026 16:31:37 +0000 (00:31 +0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 22 Apr 2026 12:53:23 +0000 (08:53 -0400)
The nfs_page_class tracepoint uses a pointer for the 'req' field marked
with the __private attribute. This causes Sparse to complain about
dereferencing a private pointer within the trace ring buffer context,
specifically during the TP_fast_assign() operation.

This fixes a Sparse warning introduced in commit b6ef079fd984 ("nfs:
more in-depth tracing of writepage events") by removing the redundant
__private attribute from the 'req' field.

Reviewed-by: Benjamin Coddington <bcodding@hammerspace.com>
Signed-off-by: Sean Chang <seanwascoding@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfstrace.h

index 9f9ce4a565ea68bf2964690ffbfba12a93f4950d..ff467959f73387b5a98134c890639f0d0a899541 100644 (file)
@@ -1496,7 +1496,7 @@ DECLARE_EVENT_CLASS(nfs_page_class,
                        __field(dev_t, dev)
                        __field(u32, fhandle)
                        __field(u64, fileid)
-                       __field(const struct nfs_page *__private, req)
+                       __field(const struct nfs_page *, req)
                        __field(loff_t, offset)
                        __field(unsigned int, count)
                        __field(unsigned long, flags)