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: Move share.h from include/linux/lockd/ to fs/lockd/

The share.h header defines struct nlm_share and declares the DOS
share management functions used by the NLM server to implement
NLM_SHARE and NLM_UNSHARE operations. These interfaces are used
exclusively within the lockd subsystem. A git grep search confirms
no external code references them.

Relocating this header from include/linux/lockd/ to fs/lockd/
narrows the public API surface of the lockd module. Out-of-tree
code cannot depend on these internal interfaces after this change.
Future refactoring of the share management implementation thus
requires no consideration of external consumers.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+12 -9
+1 -1
fs/lockd/svc4proc.c
··· 11 11 #include <linux/types.h> 12 12 #include <linux/time.h> 13 13 #include <linux/lockd/lockd.h> 14 - #include <linux/lockd/share.h> 15 14 #include <linux/sunrpc/svc_xprt.h> 16 15 16 + #include "share.h" 17 17 #include "xdr4.h" 18 18 19 19 #define NLMDBG_FACILITY NLMDBG_CLIENT
+2 -1
fs/lockd/svcproc.c
··· 11 11 #include <linux/types.h> 12 12 #include <linux/time.h> 13 13 #include <linux/lockd/lockd.h> 14 - #include <linux/lockd/share.h> 15 14 #include <linux/sunrpc/svc_xprt.h> 15 + 16 + #include "share.h" 16 17 17 18 #define NLMDBG_FACILITY NLMDBG_CLIENT 18 19
+2 -1
fs/lockd/svcshare.c
··· 15 15 #include <linux/sunrpc/clnt.h> 16 16 #include <linux/sunrpc/svc.h> 17 17 #include <linux/lockd/lockd.h> 18 - #include <linux/lockd/share.h> 18 + 19 + #include "share.h" 19 20 20 21 static inline int 21 22 nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh)
+2 -1
fs/lockd/svcsubs.c
··· 16 16 #include <linux/sunrpc/svc.h> 17 17 #include <linux/sunrpc/addr.h> 18 18 #include <linux/lockd/lockd.h> 19 - #include <linux/lockd/share.h> 20 19 #include <linux/module.h> 21 20 #include <linux/mount.h> 22 21 #include <uapi/linux/nfs2.h> 22 + 23 + #include "share.h" 23 24 24 25 #define NLMDBG_FACILITY NLMDBG_SVCSUBS 25 26
+2
include/linux/lockd/lockd.h
··· 155 155 void * a_callback_data; /* sent to nlmclnt_operations callbacks */ 156 156 }; 157 157 158 + struct nlm_share; 159 + 158 160 /* 159 161 * This struct describes a file held open by lockd on behalf of 160 162 * an NFS client.
+3 -5
include/linux/lockd/share.h fs/lockd/share.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 - * linux/include/linux/lockd/share.h 4 - * 5 3 * DOS share management for lockd. 6 4 * 7 5 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 8 6 */ 9 7 10 - #ifndef LINUX_LOCKD_SHARE_H 11 - #define LINUX_LOCKD_SHARE_H 8 + #ifndef _LOCKD_SHARE_H 9 + #define _LOCKD_SHARE_H 12 10 13 11 /* 14 12 * DOS share for a specific file ··· 27 29 void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, 28 30 nlm_host_match_fn_t); 29 31 30 - #endif /* LINUX_LOCKD_SHARE_H */ 32 + #endif /* _LOCKD_SHARE_H */