]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS()
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 16 Jun 2025 17:51:59 +0000 (13:51 -0400)
committerCarlos Maiolino <cem@kernel.org>
Thu, 24 Jul 2025 15:30:12 +0000 (17:30 +0200)
xfs_xattr_class was accidentally created as a TRACE_EVENT() instead of a
class with DECLARE_EVENT_CLASS().

Note, TRACE_EVENT() is just defined as:

 #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
DECLARE_EVENT_CLASS(name,        \
     PARAMS(proto),        \
     PARAMS(args),        \
     PARAMS(tstruct),        \
     PARAMS(assign),        \
     PARAMS(print));        \
DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));

The difference between TRACE_EVENT() and DECLARE_EVENT_CLASS() is that
TRACE_EVENT() also creates an event with the class name.

Switch xfs_xattr_class over to being a class and not an event as it is not
called directly, and that event with the class name takes up unnecessary
memory.

Fixes: e47dcf113ae3 ("xfs: repair extended attributes")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/scrub/trace.h

index d7c4ced47c156744b880504bc6a58b3a9f9a6f06..1e6e9c10cea2577cf5d040ce6c3af1387389a030 100644 (file)
@@ -2996,7 +2996,7 @@ DEFINE_EVENT(xrep_pptr_salvage_class, name, \
 DEFINE_XREP_PPTR_SALVAGE_EVENT(xrep_xattr_salvage_pptr);
 DEFINE_XREP_PPTR_SALVAGE_EVENT(xrep_xattr_insert_pptr);
 
-TRACE_EVENT(xrep_xattr_class,
+DECLARE_EVENT_CLASS(xrep_xattr_class,
        TP_PROTO(struct xfs_inode *ip, struct xfs_inode *arg_ip),
        TP_ARGS(ip, arg_ip),
        TP_STRUCT__entry(