NFSv4: fix getacl ERANGE for some ACL buffer sizes
Fix a bug where getxattr returns ERANGE when the attr buffer
length is close enough to the nearest PAGE_SIZE multiple that adding
the extra bytes leaves too little room for the ACL buffer.
Besides storing the ACL buffer, the getacl decoder uses the inline
pages for the attr bitmap and buffer length. __nfs4_get_acl_uncached
must allocate enough page space for all of the data to be decoded.
This patch uses xdr_partial_copy_from_skb to allocate any needed
pages past the first one. This allows the client to always cache the acl
on the first getacl call and not just if it fits in one page.
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
[bfields: restore call to xdr_enter_page] Signed-off-by: J. Bruce Fields <bfields@redhat.com>