]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
lockd: Relocate nlmsvc_unlock API declarations
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 15:19:26 +0000 (10:19 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
The nlmsvc_unlock_all_by_sb() and nlmsvc_unlock_all_by_ip()
functions are part of lockd's external API, consumed by other
kernel subsystems. Their declarations currently reside in
linux/lockd/lockd.h alongside internal implementation details,
which blurs the boundary between lockd's public interface and
its private internals.

Moving these declarations to linux/lockd/bind.h groups them
with other external API functions and makes the separation
explicit. This clarifies which functions are intended for
external use and reduces the risk of internal implementation
details leaking into the public API surface.

Build-tested with allyesconfig; no functional changes.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfsctl.c
include/linux/lockd/bind.h
include/linux/lockd/lockd.h

index 71aabdaa1d1594e435548b3fbfb1ff5e59c98fec..0bf01ae411c5639704f7ee40e435019a35765c87 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/fs_context.h>
 
 #include <linux/sunrpc/svcsock.h>
-#include <linux/lockd/lockd.h>
+#include <linux/lockd/bind.h>
 #include <linux/sunrpc/addr.h>
 #include <linux/sunrpc/gss_api.h>
 #include <linux/sunrpc/rpc_pipe_fs.h>
index 2f5dd9e943ee2c4af812a64fe39ffea44aae495b..82eca0a13ccc71badab5e3b06523e7f070824c22 100644 (file)
@@ -21,6 +21,7 @@
 struct svc_rqst;
 struct rpc_task;
 struct rpc_clnt;
+struct super_block;
 
 /*
  * This is the set of functions for lockd->nfsd communication
@@ -80,4 +81,10 @@ extern int   nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, vo
 extern int     lockd_up(struct net *net, const struct cred *cred);
 extern void    lockd_down(struct net *net);
 
+/*
+ * Cluster failover support
+ */
+int nlmsvc_unlock_all_by_sb(struct super_block *sb);
+int nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
+
 #endif /* LINUX_LOCKD_BIND_H */
index 195e6ce28f6e7700701fb836286055e63c8c70e9..0d883f48ec211f4be533bd2cca15035dfb1464af 100644 (file)
@@ -311,12 +311,6 @@ void                 nlmsvc_mark_resources(struct net *);
 void             nlmsvc_free_host_resources(struct nlm_host *);
 void             nlmsvc_invalidate_all(void);
 
-/*
- * Cluster failover support
- */
-int           nlmsvc_unlock_all_by_sb(struct super_block *sb);
-int           nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
-
 static inline struct file *nlmsvc_file_file(const struct nlm_file *file)
 {
        return file->f_file[O_RDONLY] ?