summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-04-14 15:50:12 -0400
committerChuck Lever <chuck.lever@oracle.com>2022-05-19 12:25:38 -0400
commit45cb7955c180a2a34d291e68938250c4f9bd294f (patch)
treebbf0d73f8dc39f81b0e7e8289cc6b59ed0968eb3 /include
parent91e23b1c39820bfed642119ff6b6ef9f43cf09ce (diff)
downloadlinux-stable-45cb7955c180a2a34d291e68938250c4f9bd294f.tar.gz
linux-stable-45cb7955c180a2a34d291e68938250c4f9bd294f.tar.bz2
linux-stable-45cb7955c180a2a34d291e68938250c4f9bd294f.zip
SUNRPC: Clean up svc_deferred_class trace events
Replace the temporary fix from commit 4d5004451ab2 ("SUNRPC: Fix the svc_deferred_event trace class") with the use of __sockaddr and friends, which is the preferred solution (but only available in 5.18 and newer). Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/sunrpc.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 3995c58a1c51..ee84e9289707 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -2015,19 +2015,18 @@ DECLARE_EVENT_CLASS(svc_deferred_event,
TP_STRUCT__entry(
__field(const void *, dr)
__field(u32, xid)
- __array(__u8, addr, INET6_ADDRSTRLEN + 10)
+ __sockaddr(addr, dr->addrlen)
),
TP_fast_assign(
__entry->dr = dr;
__entry->xid = be32_to_cpu(*(__be32 *)(dr->args +
(dr->xprt_hlen>>2)));
- snprintf(__entry->addr, sizeof(__entry->addr) - 1,
- "%pISpc", (struct sockaddr *)&dr->addr);
+ __assign_sockaddr(addr, &dr->addr, dr->addrlen);
),
- TP_printk("addr=%s dr=%p xid=0x%08x", __entry->addr, __entry->dr,
- __entry->xid)
+ TP_printk("addr=%pISpc dr=%p xid=0x%08x", __get_sockaddr(addr),
+ __entry->dr, __entry->xid)
);
#define DEFINE_SVC_DEFERRED_EVENT(name) \