From: J. Bruce Fields Date: Mon, 11 Nov 2013 16:09:32 +0000 (-0500) Subject: nfsd4: use more generous NFS4_ACL_MAX X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d139977d002e34d687e2ebc1157a234d32183465;p=linux-beck.git nfsd4: use more generous NFS4_ACL_MAX Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/acl.h b/fs/nfsd/acl.h index a812fd1b92a4..b481e1f5eecc 100644 --- a/fs/nfsd/acl.h +++ b/fs/nfsd/acl.h @@ -39,9 +39,13 @@ struct nfs4_acl; struct svc_fh; struct svc_rqst; -/* Maximum ACL we'll accept from client; chosen (somewhat arbitrarily) to - * fit in a page: */ -#define NFS4_ACL_MAX 170 +/* + * Maximum ACL we'll accept from a client; chosen (somewhat + * arbitrarily) so that kmalloc'ing the ACL shouldn't require a + * high-order allocation. This allows 204 ACEs on x86_64: + */ +#define NFS4_ACL_MAX ((PAGE_SIZE - sizeof(struct nfs4_acl)) \ + / sizeof(struct nfs4_ace)) struct nfs4_acl *nfs4_acl_new(int); int nfs4_acl_get_whotype(char *, u32);