aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorMalahal Naineni <malahal@us.ibm.com>2014-01-23 09:54:55 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-01-27 11:54:35 -0500
commit7dd7d95916fe7c8494aa8708204d5a2b8689d270 (patch)
tree80988537136637de0e411ee776ec9e22ab9f4f5c /fs/nfs/nfs4proc.c
parented7e5423014ad89720fcf315c0b73f2c5d0c7bd2 (diff)
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>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a1965329a12c..ed10d0d4f860 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2744,7 +2744,8 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
2744 NFS_CAP_OWNER_GROUP|NFS_CAP_ATIME| 2744 NFS_CAP_OWNER_GROUP|NFS_CAP_ATIME|
2745 NFS_CAP_CTIME|NFS_CAP_MTIME| 2745 NFS_CAP_CTIME|NFS_CAP_MTIME|
2746 NFS_CAP_SECURITY_LABEL); 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 server->caps |= NFS_CAP_ACLS; 2749 server->caps |= NFS_CAP_ACLS;
2749 if (res.has_links != 0) 2750 if (res.has_links != 0)
2750 server->caps |= NFS_CAP_HARDLINKS; 2751 server->caps |= NFS_CAP_HARDLINKS;
@@ -4321,9 +4322,7 @@ static int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred)
4321 4322
4322static inline int nfs4_server_supports_acls(struct nfs_server *server) 4323static inline int nfs4_server_supports_acls(struct nfs_server *server)
4323{ 4324{
4324 return (server->caps & NFS_CAP_ACLS) 4325 return server->caps & NFS_CAP_ACLS;
4325 && (server->acl_bitmask & ACL4_SUPPORT_ALLOW_ACL)
4326 && (server->acl_bitmask & ACL4_SUPPORT_DENY_ACL);
4327} 4326}
4328 4327
4329/* Assuming that XATTR_SIZE_MAX is a multiple of PAGE_SIZE, and that 4328/* Assuming that XATTR_SIZE_MAX is a multiple of PAGE_SIZE, and that