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

The xdr4.h header declares NLMv4-specific XDR encoder/decoder
functions and error codes that are used exclusively within the
lockd subsystem. Moving it from include/linux/lockd/ to fs/lockd/
clarifies the intended scope of these declarations and prevents
external code from depending on lockd-internal interfaces.

This change reduces the public API surface of the lockd module
and makes it easier to refactor NLMv4 internals without risk of
breaking out-of-tree consumers. The header's contents are
implementation details of the NLMv4 wire protocol handling, not
a contract with other kernel subsystems.

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

+12 -18
+2
fs/lockd/clnt4xdr.c
··· 17 17 18 18 #include <uapi/linux/nfs3.h> 19 19 20 + #include "xdr4.h" 21 + 20 22 #define NLMDBG_FACILITY NLMDBG_XDR 21 23 22 24 #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ)
+2
fs/lockd/svc4proc.c
··· 14 14 #include <linux/lockd/share.h> 15 15 #include <linux/sunrpc/svc_xprt.h> 16 16 17 + #include "xdr4.h" 18 + 17 19 #define NLMDBG_FACILITY NLMDBG_CLIENT 18 20 19 21 /*
+1
fs/lockd/xdr4.c
··· 19 19 #include <linux/lockd/lockd.h> 20 20 21 21 #include "svcxdr.h" 22 + #include "xdr4.h" 22 23 23 24 static inline s64 24 25 loff_t_to_s64(loff_t offset)
-3
include/linux/lockd/bind.h
··· 13 13 #include <linux/lockd/nlm.h> 14 14 /* need xdr-encoded error codes too, so... */ 15 15 #include <linux/lockd/xdr.h> 16 - #ifdef CONFIG_LOCKD_V4 17 - #include <linux/lockd/xdr4.h> 18 - #endif 19 16 20 17 /* Dummy declarations */ 21 18 struct svc_rqst;
+4 -3
include/linux/lockd/lockd.h
··· 22 22 #include <linux/utsname.h> 23 23 #include <linux/lockd/bind.h> 24 24 #include <linux/lockd/xdr.h> 25 - #ifdef CONFIG_LOCKD_V4 26 - #include <linux/lockd/xdr4.h> 27 - #endif 28 25 #include <linux/lockd/debug.h> 29 26 #include <linux/sunrpc/svc.h> 30 27 ··· 231 234 int nlmclnt_reclaim(struct nlm_host *, struct file_lock *, 232 235 struct nlm_rqst *); 233 236 void nlmclnt_next_cookie(struct nlm_cookie *); 237 + 238 + #ifdef CONFIG_LOCKD_V4 239 + extern const struct rpc_version nlm_version4; 240 + #endif 234 241 235 242 /* 236 243 * Host cache
+3 -12
include/linux/lockd/xdr4.h fs/lockd/xdr4.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 - * linux/include/linux/lockd/xdr4.h 4 - * 5 3 * XDR types for the NLM protocol 6 4 * 7 5 * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de> 8 6 */ 9 7 10 - #ifndef LOCKD_XDR4_H 11 - #define LOCKD_XDR4_H 12 - 13 - #include <linux/fs.h> 14 - #include <linux/nfs.h> 15 - #include <linux/sunrpc/xdr.h> 16 - #include <linux/lockd/xdr.h> 8 + #ifndef _LOCKD_XDR4_H 9 + #define _LOCKD_XDR4_H 17 10 18 11 /* error codes new to NLMv4 */ 19 12 #define nlm4_deadlock cpu_to_be32(NLM_DEADLCK) ··· 31 38 bool nlm4svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr); 32 39 bool nlm4svc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 33 40 34 - extern const struct rpc_version nlm_version4; 35 - 36 - #endif /* LOCKD_XDR4_H */ 41 + #endif /* _LOCKD_XDR4_H */