NFSv4: fix getacl ERANGE for some ACL buffer sizes
authorWeston Andros Adamson <dros@primarydata.com>
Thu, 23 Feb 2017 19:54:21 +0000 (14:54 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:41:51 +0000 (06:41 +0100)
commitd78f93384da1e21825144fdfac5dc0bc18db21bd
tree86e3999cfea691872160e7bb3c14060fc0709adb
parent3f22cc6f5ca335de95a49e9a217efaf1034e26ae
NFSv4: fix getacl ERANGE for some ACL buffer sizes

commit ed92d8c137b7794c2c2aa14479298b9885967607 upstream.

We're not taking into account that the space needed for the (variable
length) attr bitmap, with the result that we'd sometimes get a spurious
ERANGE when the ACL data got close to the end of a page.

Just add in an extra page to make sure.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c