]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
lockd: Remove lockd/debug.h
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 15:19:31 +0000 (10:19 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
The lockd include structure has unnecessary indirection. The header
include/linux/lockd/debug.h is consumed only by fs/lockd/lockd.h,
creating an extra compilation dependency and making the code harder
to navigate.

Fold the debug.h definitions directly into lockd.h and remove the
now-redundant header. This reduces the include tree depth and makes
the debug-related definitions easier to find when working on lockd
internals.

Build-tested with lockd built as module and built-in.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/lockd.h
include/linux/lockd/debug.h [deleted file]

index 9bcf89765a6973f2d3afdaa350a5c0d855d26e6b..460ccb70174968161050623bd9cdf4c63b5a719c 100644 (file)
 #include <linux/utsname.h>
 #include <linux/lockd/bind.h>
 #include <linux/lockd/xdr.h>
-#include <linux/lockd/debug.h>
+#include <linux/sunrpc/debug.h>
 #include <linux/sunrpc/svc.h>
 
+/*
+ * Enable lockd debugging.
+ * Requires CONFIG_SUNRPC_DEBUG.
+ */
+#undef ifdebug
+#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
+# define ifdebug(flag)         if (unlikely(nlm_debug & NLMDBG_##flag))
+#else
+# define ifdebug(flag)         if (0)
+#endif
+
+#define NLMDBG_SVC             0x0001
+#define NLMDBG_CLIENT          0x0002
+#define NLMDBG_CLNTLOCK                0x0004
+#define NLMDBG_SVCLOCK         0x0008
+#define NLMDBG_MONITOR         0x0010
+#define NLMDBG_CLNTSUBS                0x0020
+#define NLMDBG_SVCSUBS         0x0040
+#define NLMDBG_HOSTCACHE       0x0080
+#define NLMDBG_XDR             0x0100
+#define NLMDBG_ALL             0x7fff
+
 /*
  * Version string
  */
diff --git a/include/linux/lockd/debug.h b/include/linux/lockd/debug.h
deleted file mode 100644 (file)
index eede2ab..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * linux/include/linux/lockd/debug.h
- *
- * Debugging stuff.
- *
- * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef LINUX_LOCKD_DEBUG_H
-#define LINUX_LOCKD_DEBUG_H
-
-#include <linux/sunrpc/debug.h>
-
-/*
- * Enable lockd debugging.
- * Requires RPC_DEBUG.
- */
-#undef ifdebug
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
-# define ifdebug(flag)         if (unlikely(nlm_debug & NLMDBG_##flag))
-#else
-# define ifdebug(flag)         if (0)
-#endif
-
-/*
- * Debug flags
- */
-#define NLMDBG_SVC             0x0001
-#define NLMDBG_CLIENT          0x0002
-#define NLMDBG_CLNTLOCK                0x0004
-#define NLMDBG_SVCLOCK         0x0008
-#define NLMDBG_MONITOR         0x0010
-#define NLMDBG_CLNTSUBS                0x0020
-#define NLMDBG_SVCSUBS         0x0040
-#define NLMDBG_HOSTCACHE       0x0080
-#define NLMDBG_XDR             0x0100
-#define NLMDBG_ALL             0x7fff
-
-#endif /* LINUX_LOCKD_DEBUG_H */