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: Make linux/lockd/nlm.h an internal header

The NLM protocol constants and status codes in nlm.h are needed
only by lockd's internal implementation. NFS client code and
NFSD interact with lockd through the stable API in bind.h and
have no direct use for protocol-level definitions.

Exposing these definitions globally via bind.h creates unnecessary
coupling between lockd internals and its consumers. Moving nlm.h
from include/linux/lockd/ to fs/lockd/ clarifies the API boundary:
bind.h provides the lockd service interface, while nlm.h remains
available only to code within fs/lockd/ that implements the
protocol.

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

+4 -8
+1
fs/lockd/lockd.h
··· 14 14 #include <linux/kref.h> 15 15 #include <linux/refcount.h> 16 16 #include <linux/utsname.h> 17 + #include "nlm.h" 17 18 #include <linux/lockd/bind.h> 18 19 #include "xdr.h" 19 20 #include <linux/sunrpc/debug.h>
-1
fs/lockd/svclock.c
··· 28 28 #include <linux/sched.h> 29 29 #include <linux/sunrpc/clnt.h> 30 30 #include <linux/sunrpc/svc_xprt.h> 31 - #include <linux/lockd/nlm.h> 32 31 33 32 #include "lockd.h" 34 33
-2
include/linux/lockd/bind.h
··· 10 10 #ifndef LINUX_LOCKD_BIND_H 11 11 #define LINUX_LOCKD_BIND_H 12 12 13 - #include <linux/lockd/nlm.h> 14 - 15 13 struct file_lock; 16 14 struct nfs_fh; 17 15 struct svc_rqst;
+3 -5
include/linux/lockd/nlm.h fs/lockd/nlm.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 - * linux/include/linux/lockd/nlm.h 4 - * 5 3 * Declarations for the Network Lock Manager protocol. 6 4 * 7 5 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 8 6 */ 9 7 10 - #ifndef LINUX_LOCKD_NLM_H 11 - #define LINUX_LOCKD_NLM_H 8 + #ifndef _LOCKD_NLM_H 9 + #define _LOCKD_NLM_H 12 10 13 11 14 12 /* Maximum file offset in file_lock.fl_end */ ··· 53 55 #define NLMPROC_NM_LOCK 22 54 56 #define NLMPROC_FREE_ALL 23 55 57 56 - #endif /* LINUX_LOCKD_NLM_H */ 58 + #endif /* _LOCKD_NLM_H */