[PATCH v1 10/17] Improve correctness for the ACL_TRUEFORM attribute

rick.macklem
2025-12-31T02:22:26Z

fs/nfsd/nfs4xdr.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 60197963c854..d12e479c18d3 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3615,8 +3615,12 @@ static __be32 nfsd4_encode_fattr4_open_arguments(struct xdr_stream *xdr,
static __be32 nfsd4_encode_fattr4_acl_trueform(struct xdr_stream *xdr,
const struct nfsd4_fattr_args *args)
{
+ u32 trueform;

- return nfsd4_encode_uint32_t(xdr, ACL_MODEL_POSIX_DRAFT);
+ trueform = ACL_MODEL_NONE;
+ if (IS_POSIXACL(d_inode(args->dentry)))
+ trueform = ACL_MODEL_POSIX_DRAFT;
+ return nfsd4_encode_uint32_t(xdr, trueform);
}

static __be32 nfsd4_encode_fattr4_acl_trueform_scope(struct xdr_stream *xdr,
--
2.49.0