]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
lockd: Relocate include/linux/lockd/lockd.h
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 15:19:30 +0000 (10:19 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
Headers placed in include/linux/ form part of the kernel's
internal API and signal to subsystem maintainers that other
parts of the kernel may depend on them. By moving lockd.h
into fs/lockd/, lockd becomes a more self-contained module
whose internal interfaces are clearly distinguished from its
public contract with the rest of the kernel. This relocation
addresses a long-standing XXX comment in the header itself
that acknowledged the file's misplacement. Future changes to
lockd internals can now proceed with confidence that external
consumers are not inadvertently coupled to implementation
details.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
16 files changed:
fs/lockd/clnt4xdr.c
fs/lockd/clntlock.c
fs/lockd/clntproc.c
fs/lockd/clntxdr.c
fs/lockd/host.c
fs/lockd/lockd.h [moved from include/linux/lockd/lockd.h with 98% similarity]
fs/lockd/mon.c
fs/lockd/svc.c
fs/lockd/svc4proc.c
fs/lockd/svclock.c
fs/lockd/svcproc.c
fs/lockd/svcshare.c
fs/lockd/svcsubs.c
fs/lockd/trace.h
fs/lockd/xdr.c
fs/lockd/xdr4.c

index 23896073c7e5bf98faee80a5f7f283e0cb6eef78..61ee5fa6dfa460bd43ea6c24f75bc89d3c807bb9 100644 (file)
@@ -13,7 +13,8 @@
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/stats.h>
-#include <linux/lockd/lockd.h>
+
+#include "lockd.h"
 
 #include <uapi/linux/nfs3.h>
 
index 85bc0f3e91dfe5e6b633c9c269577e53de7f79c4..8fa30c42c92a28d0b22b8e02a87f7646665b9d37 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/sunrpc/addr.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/svc_xprt.h>
-#include <linux/lockd/lockd.h>
 #include <linux/kthread.h>
 
+#include "lockd.h"
 #include "trace.h"
 
 #define NLMDBG_FACILITY                NLMDBG_CLIENT
index fb4d0752c9bbde06d74d88508c376c9f340501a2..7f211008a5d2fa71bde8eb87e5ee47d7da98f777 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/freezer.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc.h>
-#include <linux/lockd/lockd.h>
 
+#include "lockd.h"
 #include "trace.h"
 
 #define NLMDBG_FACILITY                NLMDBG_CLIENT
index 6ea3448d2d31ea54451d6ec0fd01c5f31c35e123..65555f5224b14b4fe9ae7632aab75d68ba65e5d0 100644 (file)
@@ -15,7 +15,8 @@
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/stats.h>
-#include <linux/lockd/lockd.h>
+
+#include "lockd.h"
 
 #include <uapi/linux/nfs2.h>
 
index 015900d2d4c22931ace58b960326386d64a5bbe6..ea8a8e166f7e4eee0ecd508ef97dd12eba919ca7 100644 (file)
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/addr.h>
 #include <linux/sunrpc/svc.h>
-#include <linux/lockd/lockd.h>
 #include <linux/mutex.h>
 
 #include <linux/sunrpc/svc_xprt.h>
 
 #include <net/ipv6.h>
 
+#include "lockd.h"
 #include "netns.h"
 
 #define NLMDBG_FACILITY                NLMDBG_HOSTCACHE
similarity index 98%
rename from include/linux/lockd/lockd.h
rename to fs/lockd/lockd.h
index eebcecd12faeeb16a0b48dbc43b4521fdf0e338b..9bcf89765a6973f2d3afdaa350a5c0d855d26e6b 100644 (file)
@@ -1,16 +1,10 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * linux/include/linux/lockd/lockd.h
- *
- * General-purpose lockd include file.
- *
  * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
  */
 
-#ifndef LINUX_LOCKD_LOCKD_H
-#define LINUX_LOCKD_LOCKD_H
-
-/* XXX: a lot of this should really be under fs/lockd. */
+#ifndef _LOCKD_LOCKD_H
+#define _LOCKD_LOCKD_H
 
 #include <linux/exportfs.h>
 #include <linux/in.h>
@@ -398,4 +392,4 @@ static inline int nlm_compare_locks(const struct file_lock *fl1,
 
 extern const struct lock_manager_operations nlmsvc_lock_operations;
 
-#endif /* LINUX_LOCKD_LOCKD_H */
+#endif /* _LOCKD_LOCKD_H */
index b8fc732e1c677063a0d0a1385a64ce22fe216ae4..3d3ee88ca4dc298638efb83c243f9aac3abee7e2 100644 (file)
 #include <linux/sunrpc/addr.h>
 #include <linux/sunrpc/xprtsock.h>
 #include <linux/sunrpc/svc.h>
-#include <linux/lockd/lockd.h>
 
 #include <linux/unaligned.h>
 
+#include "lockd.h"
 #include "netns.h"
 
 #define NLMDBG_FACILITY                NLMDBG_MONITOR
index dcd80c4e74c94564f0ab7b74df4d37a802ac414c..9dd7f8e1154412d21c3c66ecc15503f819dfad56 100644 (file)
@@ -36,9 +36,9 @@
 #include <net/ip.h>
 #include <net/addrconf.h>
 #include <net/ipv6.h>
-#include <linux/lockd/lockd.h>
 #include <linux/nfs.h>
 
+#include "lockd.h"
 #include "netns.h"
 #include "procfs.h"
 #include "netlink.h"
index da88b638d90d6704c965eedf0d606e9ae3b077a6..86dfeb6ce68d415528b462b0f117945a1a5f116b 100644 (file)
@@ -10,9 +10,9 @@
 
 #include <linux/types.h>
 #include <linux/time.h>
-#include <linux/lockd/lockd.h>
 #include <linux/sunrpc/svc_xprt.h>
 
+#include "lockd.h"
 #include "share.h"
 #include "xdr4.h"
 
index 5edf00751a1e7ef6fbcb4e92c77efd44c3907fa1..1c800fffe69c3a949db8ec348a90e2f9752de203 100644 (file)
@@ -29,7 +29,8 @@
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc_xprt.h>
 #include <linux/lockd/nlm.h>
-#include <linux/lockd/lockd.h>
+
+#include "lockd.h"
 
 #define NLMDBG_FACILITY                NLMDBG_SVCLOCK
 
index 8441fabd019fa394407789dd7bfa19a68796e17d..e9a6bcc3bf2e9348476b0e2674e6477039eeb3e9 100644 (file)
@@ -10,9 +10,9 @@
 
 #include <linux/types.h>
 #include <linux/time.h>
-#include <linux/lockd/lockd.h>
 #include <linux/sunrpc/svc_xprt.h>
 
+#include "lockd.h"
 #include "share.h"
 
 #define NLMDBG_FACILITY                NLMDBG_CLIENT
index 8e06840834c60d05b3fc9c0d1c83d4c2843672f2..8675ac80ab164cc37dcaf3319354d175857d6714 100644 (file)
@@ -14,8 +14,8 @@
 
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc.h>
-#include <linux/lockd/lockd.h>
 
+#include "lockd.h"
 #include "share.h"
 
 static inline int
index ce596a17112ca4930fac246897e26452bd995e21..71eaec5ed8d7832a8ca2a84c26b9913188210c63 100644 (file)
 #include <linux/mutex.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/addr.h>
-#include <linux/lockd/lockd.h>
 #include <linux/module.h>
 #include <linux/mount.h>
 #include <uapi/linux/nfs2.h>
 
+#include "lockd.h"
 #include "share.h"
 
 #define NLMDBG_FACILITY                NLMDBG_SVCSUBS
index 7461b13b6e7446613602349f3f46f680a45cc65e..7214d7e96a42424854454bb1dbea6ace1a73cdb4 100644 (file)
@@ -8,7 +8,8 @@
 #include <linux/tracepoint.h>
 #include <linux/crc32.h>
 #include <linux/nfs.h>
-#include <linux/lockd/lockd.h>
+
+#include "lockd.h"
 
 #ifdef CONFIG_LOCKD_V4
 #define NLM_STATUS_LIST                                        \
index adfcce2bf11ba7081d5748f3978c43f13a922e49..5aac49d1875af58c8bdb2390f0a1dfba9abf49fa 100644 (file)
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/stats.h>
-#include <linux/lockd/lockd.h>
 
 #include <uapi/linux/nfs2.h>
 
+#include "lockd.h"
 #include "svcxdr.h"
 
-
 static inline loff_t
 s32_to_loff_t(__s32 offset)
 {
index 5b1e15977697c05fec9fd96fa72c9c4dabaddf14..f57d4881d5f1706cc1f84709e500cc9c682a56f3 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/stats.h>
-#include <linux/lockd/lockd.h>
 
+#include "lockd.h"
 #include "svcxdr.h"
 #include "xdr4.h"