All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] nfs: Guard nfs_local_open_fh tracepoint with CONFIG_NFS_LOCALIO
@ 2026-10-25 15:30 pavankumaryalagada
  2026-10-26  0:25 ` Julia Lawall
  2026-11-07 21:43 ` Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: pavankumaryalagada @ 2026-10-25 15:30 UTC (permalink / raw)
  To: outreachy; +Cc: rostedt, julianbraha, Yalagada Pavan Kumar

From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>

The nfs_local_open_fh tracepoint is used in fs/nfs/localio.c.
The NFS Makefile includes localio.o in the NFS module only when
CONFIG_NFS_LOCALIO is enabled. When this configuration is disabled,
localio.o is not built, leaving this tracepoint unused.

Guard the tracepoint definition with CONFIG_NFS_LOCALIO to avoid
wasting memory when it is not used.

Fixes: 70ba381e1a43 ("nfs: add LOCALIO support")
Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
---
v2:
- Explain why the tracepoint needs a CONFIG_NFS_LOCALIO guard.

v1: https://lore.kernel.org/outreachy/736e1fe0-f4bf-abcf-b7b-1cd874cce131@inria.fr/T/#t
---
 fs/nfs/nfstrace.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index b15c1732c869..bbd7735a1f67 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -1898,6 +1898,7 @@ TRACE_EVENT(nfs_mount_path,
 	TP_printk("path='%s'", __get_str(path))
 );
 
+#ifdef CONFIG_NFS_LOCALIO
 TRACE_EVENT(nfs_local_open_fh,
 		TP_PROTO(
 			const struct nfs_fh *fh,
@@ -1926,6 +1927,7 @@ TRACE_EVENT(nfs_local_open_fh,
 			__entry->error
 		)
 );
+#endif /* CONFIG_NFS_LOCALIO */
 
 DECLARE_EVENT_CLASS(nfs_xdr_event,
 		TP_PROTO(
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-07 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25 15:30 [PATCH v2] nfs: Guard nfs_local_open_fh tracepoint with CONFIG_NFS_LOCALIO pavankumaryalagada
2026-10-26  0:25 ` Julia Lawall
2026-11-07 21:43 ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.