On Sun, Feb 19, 2017 at 3:07 AM, J. Bruce Fields <bfields@xxxxxxxxxx> wrote: > From: "J. Bruce Fields" <bfields@xxxxxxxxxx> > > Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> Reviewed-by: Andreas Gruenbacher <agreuenba@xxxxxxxxx> > --- > fs/nfs/nfs4proc.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c > index a4e33e519f6e..eb6c34db9a79 100644 > --- a/fs/nfs/nfs4proc.c > +++ b/fs/nfs/nfs4proc.c > @@ -5134,11 +5134,9 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu > out_ok: > ret = res.acl_len; > out_free: > - for (i = 0; i < npages; i++) > - if (pages[i]) > - __free_page(pages[i]); > - if (res.acl_scratch) > - __free_page(res.acl_scratch); > + for (i = 0; i < ARRAY_SIZE(pages) && pages[i]; i++) > + __free_page(pages[i]); > + __free_page(res.acl_scratch); > return ret; > } > > -- > 2.9.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html