From: rick.macklem@gmail.com
To: linux-nfs@vger.kernel.org
Cc: Rick Macklem <rmacklem@uoguelph.ca>
Subject: [PATCH v1 5/7] Make nfs4_server_supports_acls() global
Date: Fri, 2 Jan 2026 15:29:32 -0800 [thread overview]
Message-ID: <20260102232934.1560-6-rick.macklem@gmail.com> (raw)
In-Reply-To: <20260102232934.1560-1-rick.macklem@gmail.com>
From: Rick Macklem <rmacklem@uoguelph.ca>
Add support for the POSIX draft ACL attributes to
nfs4_server_supports_acls() and make it global,
so that support for POSIX draft ACLs can be checked
in nfs4proc.c.
Signed-off-by: Rick Macklem <rmacklem@uoguelph.ca>
---
fs/nfs/nfs4_fs.h | 2 ++
fs/nfs/nfs4proc.c | 6 +++++-
include/linux/nfs_xdr.h | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index c34c89af9c7d..19e3398d50f7 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -337,6 +337,8 @@ extern void nfs4_update_changeattr(struct inode *dir,
struct nfs4_change_info *cinfo,
unsigned long timestamp,
unsigned long cache_validity);
+extern bool nfs4_server_supports_acls(const struct nfs_server *server,
+ enum nfs4_acl_type type);
extern int nfs4_buf_to_pages_noslab(const void *buf, size_t buflen,
struct page **pages);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ec1ce593dea2..3057622ed61a 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6069,7 +6069,7 @@ static int nfs4_proc_renew(struct nfs_client *clp, const struct cred *cred)
return 0;
}
-static bool nfs4_server_supports_acls(const struct nfs_server *server,
+bool nfs4_server_supports_acls(const struct nfs_server *server,
enum nfs4_acl_type type)
{
switch (type) {
@@ -6079,6 +6079,10 @@ static bool nfs4_server_supports_acls(const struct nfs_server *server,
return server->attr_bitmask[1] & FATTR4_WORD1_DACL;
case NFS4ACL_SACL:
return server->attr_bitmask[1] & FATTR4_WORD1_SACL;
+ case NFS4ACL_POSIXDEFAULT:
+ return server->attr_bitmask[2] & FATTR4_WORD2_POSIX_DEFAULT_ACL;
+ case NFS4ACL_POSIXACCESS:
+ return server->attr_bitmask[2] & FATTR4_WORD2_POSIX_ACCESS_ACL;
}
}
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 5ff8ab3f0f84..3b656086b452 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -832,6 +832,8 @@ enum nfs4_acl_type {
NFS4ACL_ACL,
NFS4ACL_DACL,
NFS4ACL_SACL,
+ NFS4ACL_POSIXDEFAULT,
+ NFS4ACL_POSIXACCESS,
};
struct nfs_setaclargs {
--
2.49.0
next prev parent reply other threads:[~2026-01-02 23:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 23:29 [PATCH v1 0/7] Add NFSv4.2 POSIX ACL support to the client rick.macklem
2026-01-02 23:29 ` [PATCH v1 1/7] Add entries to the predefined client operations enum rick.macklem
2026-01-02 23:29 ` [PATCH v1 2/7] Add new entries for handling POSIX draft ACLs rick.macklem
2026-01-02 23:29 ` [PATCH v1 3/7] Make posix_acl_from_nfsacl() global rick.macklem
2026-01-02 23:29 ` [PATCH v1 4/7] Make three functions global and move them to acl.c rick.macklem
2026-01-02 23:29 ` rick.macklem [this message]
2026-01-03 14:37 ` [PATCH v1 5/7] Make nfs4_server_supports_acls() global kernel test robot
2026-01-03 16:04 ` Rick Macklem
2026-01-03 15:15 ` kernel test robot
2026-01-09 21:14 ` kernel test robot
2026-01-09 21:55 ` kernel test robot
2026-01-09 23:06 ` Rick Macklem
2026-01-09 23:50 ` kernel test robot
2026-01-02 23:29 ` [PATCH v1 6/7] Set SB_POSIXACL if the server supports the extension rick.macklem
2026-01-03 16:25 ` kernel test robot
2026-01-03 16:38 ` Rick Macklem
2026-01-02 23:29 ` [PATCH v1 7/7] Add support for the NFSv4.2 POSIX draft ACL attributes rick.macklem
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=20260102232934.1560-6-rick.macklem@gmail.com \
--to=rick.macklem@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=rmacklem@uoguelph.ca \
/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