summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-11-11 11:09:32 -0500
committerJ. Bruce Fields <bfields@redhat.com>2014-03-28 21:24:53 -0400
commitd139977d002e34d687e2ebc1157a234d32183465 (patch)
tree1f6f15a29e6e8edbe4902d83824e359c9d3195f4 /fs/nfsd
parent0da7b19cc3f9c7e762de02cb2152eaf20272a144 (diff)
downloadop-kernel-dev-d139977d002e34d687e2ebc1157a234d32183465.zip
op-kernel-dev-d139977d002e34d687e2ebc1157a234d32183465.tar.gz
nfsd4: use more generous NFS4_ACL_MAX
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/acl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/nfsd/acl.h b/fs/nfsd/acl.h
index a812fd1..b481e1f 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);
OpenPOWER on IntegriCloud