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>
#include <linux/kref.h>
#include <linux/refcount.h>
#include <linux/utsname.h>
+#include "nlm.h"
#include <linux/lockd/bind.h>
#include "xdr.h"
#include <linux/sunrpc/debug.h>
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * linux/include/linux/lockd/nlm.h
- *
* Declarations for the Network Lock Manager protocol.
*
* Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
*/
-#ifndef LINUX_LOCKD_NLM_H
-#define LINUX_LOCKD_NLM_H
+#ifndef _LOCKD_NLM_H
+#define _LOCKD_NLM_H
/* Maximum file offset in file_lock.fl_end */
#define NLMPROC_NM_LOCK 22
#define NLMPROC_FREE_ALL 23
-#endif /* LINUX_LOCKD_NLM_H */
+#endif /* _LOCKD_NLM_H */
#include <linux/sched.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/svc_xprt.h>
-#include <linux/lockd/nlm.h>
#include "lockd.h"
#ifndef LINUX_LOCKD_BIND_H
#define LINUX_LOCKD_BIND_H
-#include <linux/lockd/nlm.h>
-
struct file_lock;
struct nfs_fh;
struct svc_rqst;