Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lockd: Remove lockd/debug.h

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>

+23 -41
+23 -1
fs/lockd/lockd.h
··· 16 16 #include <linux/utsname.h> 17 17 #include <linux/lockd/bind.h> 18 18 #include <linux/lockd/xdr.h> 19 - #include <linux/lockd/debug.h> 19 + #include <linux/sunrpc/debug.h> 20 20 #include <linux/sunrpc/svc.h> 21 + 22 + /* 23 + * Enable lockd debugging. 24 + * Requires CONFIG_SUNRPC_DEBUG. 25 + */ 26 + #undef ifdebug 27 + #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) 28 + # define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag)) 29 + #else 30 + # define ifdebug(flag) if (0) 31 + #endif 32 + 33 + #define NLMDBG_SVC 0x0001 34 + #define NLMDBG_CLIENT 0x0002 35 + #define NLMDBG_CLNTLOCK 0x0004 36 + #define NLMDBG_SVCLOCK 0x0008 37 + #define NLMDBG_MONITOR 0x0010 38 + #define NLMDBG_CLNTSUBS 0x0020 39 + #define NLMDBG_SVCSUBS 0x0040 40 + #define NLMDBG_HOSTCACHE 0x0080 41 + #define NLMDBG_XDR 0x0100 42 + #define NLMDBG_ALL 0x7fff 21 43 22 44 /* 23 45 * Version string
-40
include/linux/lockd/debug.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * linux/include/linux/lockd/debug.h 4 - * 5 - * Debugging stuff. 6 - * 7 - * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de> 8 - */ 9 - 10 - #ifndef LINUX_LOCKD_DEBUG_H 11 - #define LINUX_LOCKD_DEBUG_H 12 - 13 - #include <linux/sunrpc/debug.h> 14 - 15 - /* 16 - * Enable lockd debugging. 17 - * Requires RPC_DEBUG. 18 - */ 19 - #undef ifdebug 20 - #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) 21 - # define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag)) 22 - #else 23 - # define ifdebug(flag) if (0) 24 - #endif 25 - 26 - /* 27 - * Debug flags 28 - */ 29 - #define NLMDBG_SVC 0x0001 30 - #define NLMDBG_CLIENT 0x0002 31 - #define NLMDBG_CLNTLOCK 0x0004 32 - #define NLMDBG_SVCLOCK 0x0008 33 - #define NLMDBG_MONITOR 0x0010 34 - #define NLMDBG_CLNTSUBS 0x0020 35 - #define NLMDBG_SVCSUBS 0x0040 36 - #define NLMDBG_HOSTCACHE 0x0080 37 - #define NLMDBG_XDR 0x0100 38 - #define NLMDBG_ALL 0x7fff 39 - 40 - #endif /* LINUX_LOCKD_DEBUG_H */