From: Chuck Lever <cel@kernel.org>
To: NeilBrown <neil@brown.name>, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>
Subject: [PATCH v1 05/17] NFSD: Move the definition of NFS_ACL_MAX_ENTRIES
Date: Thu, 22 Oct 2026 09:53:29 -0400 [thread overview]
Message-ID: <20261022135341.14265-6-cel@kernel.org> (raw)
In-Reply-To: <20261022135341.14265-1-cel@kernel.org>
Separate the inclusion of protocol-defined items from forward
declarations for internal functions. This makes it easier to
convert single source files to use the xdrgen-built headers.
Signed-off-by: Chuck Lever <cel@kernel.org>
---
fs/nfs/nfs3acl.c | 1 +
fs/nfs/nfs3client.c | 1 +
fs/nfs/nfs3xdr.c | 1 +
fs/nfs_common/nfsacl.c | 2 ++
fs/nfsd/nfs2acl.c | 3 ++-
fs/nfsd/nfs3acl.c | 4 +++-
fs/nfsd/nfs4xdr.c | 1 +
fs/nfsd/nfssvc.c | 1 +
include/linux/nfsacl.h | 5 -----
include/uapi/linux/nfsacl.h | 2 ++
10 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
index a126eb31f62f..e9b9ee7cc354 100644
--- a/fs/nfs/nfs3acl.c
+++ b/fs/nfs/nfs3acl.c
@@ -6,6 +6,7 @@
#include <linux/nfs_fs.h>
#include <linux/posix_acl_xattr.h>
#include <linux/nfsacl.h>
+#include <uapi/linux/nfsacl.h>
#include "internal.h"
#include "nfs3_fs.h"
diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c
index 5d97c1d38bb6..eeb86c8a4a04 100644
--- a/fs/nfs/nfs3client.c
+++ b/fs/nfs/nfs3client.c
@@ -3,6 +3,7 @@
#include <linux/nfs_mount.h>
#include <linux/sunrpc/addr.h>
#include <net/handshake.h>
+#include <uapi/linux/nfsacl.h>
#include "internal.h"
#include "nfs3_fs.h"
#include "netns.h"
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index e745e78faab0..3251c1434e71 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -21,6 +21,7 @@
#include <linux/nfs3.h>
#include <linux/nfs_fs.h>
#include <linux/nfsacl.h>
+#include <uapi/linux/nfsacl.h>
#include <linux/nfs_common.h>
#include "internal.h"
diff --git a/fs/nfs_common/nfsacl.c b/fs/nfs_common/nfsacl.c
index 09d941303d16..a66294fcfb6e 100644
--- a/fs/nfs_common/nfsacl.c
+++ b/fs/nfs_common/nfsacl.c
@@ -29,6 +29,8 @@
#include <linux/nfs3.h>
#include <linux/sort.h>
+#include <uapi/linux/nfsacl.h>
+
MODULE_DESCRIPTION("NFS ACL support");
MODULE_LICENSE("GPL");
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
index 14f637d87685..93224144105e 100644
--- a/fs/nfsd/nfs2acl.c
+++ b/fs/nfsd/nfs2acl.c
@@ -7,8 +7,9 @@
#include "nfsd.h"
#include "nfserr.h"
-/* FIXME: nfsacl.h is a broken header */
+
#include <linux/nfsacl.h>
+#include <uapi/linux/nfsacl.h>
#include <linux/gfp.h>
#include "cache.h"
#include "xdr.h"
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
index 324cfdd7b262..58f1297c88f9 100644
--- a/fs/nfsd/nfs3acl.c
+++ b/fs/nfsd/nfs3acl.c
@@ -7,9 +7,11 @@
#include "nfsd.h"
#include "nfserr.h"
-/* FIXME: nfsacl.h is a broken header */
+
#include <linux/nfsacl.h>
+#include <uapi/linux/nfsacl.h>
#include <linux/gfp.h>
+
#include "cache.h"
#include "xdr3.h"
#include "vfs.h"
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index c4fd840da4d9..f08b87d3f469 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -44,6 +44,7 @@
#include <linux/xattr.h>
#include <linux/vmalloc.h>
#include <linux/nfsacl.h>
+#include <uapi/linux/nfsacl.h>
#include <uapi/linux/xattr.h>
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 067543da3ca0..2d719e9ab152 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -19,6 +19,7 @@
#include <linux/sunrpc/svc_xprt.h>
#include <linux/lockd/bind.h>
#include <linux/nfsacl.h>
+#include <uapi/linux/nfsacl.h>
#include <linux/nfslocalio.h>
#include <linux/seq_file.h>
#include <linux/inetdevice.h>
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h
index fc00280e67b1..403f5f5144e3 100644
--- a/include/linux/nfsacl.h
+++ b/include/linux/nfsacl.h
@@ -7,13 +7,8 @@
#ifndef __LINUX_NFSACL_H
#define __LINUX_NFSACL_H
-
#include <linux/posix_acl.h>
#include <linux/sunrpc/xdr.h>
-#include <uapi/linux/nfsacl.h>
-
-/* Maximum number of ACL entries over NFS */
-#define NFS_ACL_MAX_ENTRIES 1024
#define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \
>> PAGE_SHIFT)
diff --git a/include/uapi/linux/nfsacl.h b/include/uapi/linux/nfsacl.h
index 2c2ad204d3b0..8db7ad6d1dfe 100644
--- a/include/uapi/linux/nfsacl.h
+++ b/include/uapi/linux/nfsacl.h
@@ -19,6 +19,8 @@
#define ACLPROC3_GETACL 1
#define ACLPROC3_SETACL 2
+/* Maximum number of ACL entries over NFS */
+#define NFS_ACL_MAX_ENTRIES 1024
/* Flags for the getacl/setacl mode */
#define NFS_ACL 0x0001
--
2.56.0
next prev parent reply other threads:[~2026-10-22 13:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 13:53 [PATCH v1 00/17] Convert server-side NFS_ACLv2 XDR to use xdrgen Chuck Lever
2026-10-22 13:53 ` [PATCH v1 01/17] xdrgen: Reject out-of-range unsigned short values on decode Chuck Lever
2026-10-22 13:53 ` [PATCH v1 02/17] xdrgen: Reject out-of-range " Chuck Lever
2026-10-22 13:53 ` [PATCH v1 03/17] nfs_common: Export posix_acl_from_nfsacl for server ACL codecs Chuck Lever
2026-10-22 13:53 ` [PATCH v1 04/17] NFSD: Remove the unused NFSACL_MAXWORDS macro Chuck Lever
2026-10-22 13:53 ` Chuck Lever [this message]
2026-10-22 13:53 ` [PATCH v1 06/17] Documentation: Add the RPC language description of NFS_ACLv2 Chuck Lever
2026-10-22 13:53 ` [PATCH v1 07/17] NFSD: Add infrastructure for generating NFS_ACLv2 XDR encoders and decoders Chuck Lever
2026-10-22 13:53 ` [PATCH v1 08/17] NFSD: Remove '#include "xdr3.h"' from nfs2acl.c Chuck Lever
2026-10-22 13:53 ` [PATCH v1 09/17] NFSD: Remove '#include "xdr.h"' " Chuck Lever
2026-10-22 13:53 ` [PATCH v1 10/17] NFSD: Switch to using the NFS_ACLv2 status codes Chuck Lever
2026-10-22 13:53 ` [PATCH v1 11/17] NFSD: Use xdrgen XDR functions for the NFS-ACL v2 NULL procedure Chuck Lever
2026-10-22 13:53 ` [PATCH v1 12/17] NFSD: Implement NFS-ACL v2 ACL encoding and decoding with xdrgen Chuck Lever
2026-10-22 13:53 ` [PATCH v1 13/17] NFSD: Use xdrgen XDR functions for the NFS-ACL v2 GETACL procedure Chuck Lever
2026-10-22 13:53 ` [PATCH v1 14/17] NFSD: Use xdrgen XDR functions for the NFS-ACL v2 SETACL procedure Chuck Lever
2026-10-22 13:53 ` [PATCH v1 15/17] NFSD: Use xdrgen XDR functions for the NFS-ACL v2 GETATTR procedure Chuck Lever
2026-10-22 13:53 ` [PATCH v1 16/17] NFSD: Use xdrgen XDR functions for the NFS-ACL v2 ACCESS procedure Chuck Lever
2026-10-22 13:53 ` [PATCH v1 17/17] NFSD: Map every NFS_ACLv2 reply status into aclstat2 Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022135341.14265-6-cel@kernel.org \
--to=cel@kernel.org \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox