Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfs: handle servers that support only ALLOW ACE type.

Currently we support ACLs if the NFS server file system supports both
ALLOW and DENY ACE types. This patch makes the Linux client work with
ACLs even if the server supports only 'ALLOW' ACE type.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

authored by

Malahal Naineni and committed by
Trond Myklebust
7dd7d959 ed7e5423

+3 -4
+3 -4
fs/nfs/nfs4proc.c
··· 2744 2744 NFS_CAP_OWNER_GROUP|NFS_CAP_ATIME| 2745 2745 NFS_CAP_CTIME|NFS_CAP_MTIME| 2746 2746 NFS_CAP_SECURITY_LABEL); 2747 - if (res.attr_bitmask[0] & FATTR4_WORD0_ACL) 2747 + if (res.attr_bitmask[0] & FATTR4_WORD0_ACL && 2748 + res.acl_bitmask & ACL4_SUPPORT_ALLOW_ACL) 2748 2749 server->caps |= NFS_CAP_ACLS; 2749 2750 if (res.has_links != 0) 2750 2751 server->caps |= NFS_CAP_HARDLINKS; ··· 4322 4321 4323 4322 static inline int nfs4_server_supports_acls(struct nfs_server *server) 4324 4323 { 4325 - return (server->caps & NFS_CAP_ACLS) 4326 - && (server->acl_bitmask & ACL4_SUPPORT_ALLOW_ACL) 4327 - && (server->acl_bitmask & ACL4_SUPPORT_DENY_ACL); 4324 + return server->caps & NFS_CAP_ACLS; 4328 4325 } 4329 4326 4330 4327 /* Assuming that XATTR_SIZE_MAX is a multiple of PAGE_SIZE, and that