NFS: Fix a bogus warning in nfs_generic_pgio
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 13 Oct 2014 14:56:12 +0000 (10:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:40:14 +0000 (09:40 -0700)
commit4e6dea4368c8352c269bfb06f792ff4b1e260a9f
tree2167f6156ad987dd7adc1a75106d1fedc2c8849e
parentdb946becd0c21af9cc5362671475152c9022824b
NFS: Fix a bogus warning in nfs_generic_pgio

commit b8fb9c30f25e45dab5d2cd310ab6913b6861d00f upstream.

It is OK for pageused == pagecount in the loop, as long as we don't add
another entry to the *pages array. Move the test so that it only triggers
in that case.

Reported-by: Steve Dickson <SteveD@redhat.com>
Fixes: bba5c1887a92 (nfs: disallow duplicate pages in pgio page vectors)
Cc: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pagelist.c