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:37:30 +0000 (06:37 +0100)
commita0378b5bfc2700365829858e3ab95a5995a3f266
tree8648a0acb3f3f81d47ca36e8b1c654ec3622bb61
parent5d23e89065cd3c6a6fb5e5a90aa67b619a673490
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