aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-12-07 11:55:27 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-05 10:42:42 -0500
commitbf118a342f10dafe44b14451a1392c3254629a1f (patch)
tree50c2800c7c92f8e47e4a0a440e2a97847f678e19 /include/linux/nfs_xdr.h
parent3476f114addb7b96912840a234702f660a1f460b (diff)
NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data xdr length to the (cached) acl page data. This is a general solution to commit e5012d1f "NFSv4.1: update nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead when getting ACLs. Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved. Cc: stable@kernel.org Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 2a7c533be5dd..6c898afe6095 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -602,11 +602,16 @@ struct nfs_getaclargs {
602 size_t acl_len; 602 size_t acl_len;
603 unsigned int acl_pgbase; 603 unsigned int acl_pgbase;
604 struct page ** acl_pages; 604 struct page ** acl_pages;
605 struct page * acl_scratch;
605 struct nfs4_sequence_args seq_args; 606 struct nfs4_sequence_args seq_args;
606}; 607};
607 608
609/* getxattr ACL interface flags */
610#define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */
608struct nfs_getaclres { 611struct nfs_getaclres {
609 size_t acl_len; 612 size_t acl_len;
613 size_t acl_data_offset;
614 int acl_flags;
610 struct nfs4_sequence_res seq_res; 615 struct nfs4_sequence_res seq_res;
611}; 616};
612 617