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: Relocate nlmsvc_unlock API declarations

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>

+8 -7
+1 -1
fs/nfsd/nfsctl.c
··· 11 11 #include <linux/fs_context.h> 12 12 13 13 #include <linux/sunrpc/svcsock.h> 14 - #include <linux/lockd/lockd.h> 14 + #include <linux/lockd/bind.h> 15 15 #include <linux/sunrpc/addr.h> 16 16 #include <linux/sunrpc/gss_api.h> 17 17 #include <linux/sunrpc/rpc_pipe_fs.h>
+7
include/linux/lockd/bind.h
··· 21 21 struct svc_rqst; 22 22 struct rpc_task; 23 23 struct rpc_clnt; 24 + struct super_block; 24 25 25 26 /* 26 27 * This is the set of functions for lockd->nfsd communication ··· 80 79 extern int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data); 81 80 extern int lockd_up(struct net *net, const struct cred *cred); 82 81 extern void lockd_down(struct net *net); 82 + 83 + /* 84 + * Cluster failover support 85 + */ 86 + int nlmsvc_unlock_all_by_sb(struct super_block *sb); 87 + int nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr); 83 88 84 89 #endif /* LINUX_LOCKD_BIND_H */
-6
include/linux/lockd/lockd.h
··· 311 311 void nlmsvc_free_host_resources(struct nlm_host *); 312 312 void nlmsvc_invalidate_all(void); 313 313 314 - /* 315 - * Cluster failover support 316 - */ 317 - int nlmsvc_unlock_all_by_sb(struct super_block *sb); 318 - int nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr); 319 - 320 314 static inline struct file *nlmsvc_file_file(const struct nlm_file *file) 321 315 { 322 316 return file->f_file[O_RDONLY] ?