nfsd4: fix xdr decoding of large non-write compounds
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 19 Nov 2013 22:32:43 +0000 (17:32 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 3 Jan 2014 04:33:23 +0000 (04:33 +0000)
commitbca06620c941f2427f13710e330adcef1cf30007
tree07f3d7a87717524034ab931df3e3543825e2e385
parent9bbbbf7ff19de7a05190217a62e9f599f18ecd7d
nfsd4: fix xdr decoding of large non-write compounds

commit 365da4adebb1c012febf81019ad3dc5bb52e2a13 upstream.

This fixes a regression from 247500820ebd02ad87525db5d9b199e5b66f6636
"nfsd4: fix decoding of compounds across page boundaries".  The previous
code was correct: argp->pagelist is initialized in
nfs4svc_deocde_compoundargs to rqstp->rq_arg.pages, and is therefore a
pointer to the page *after* the page we are currently decoding.

The reason that patch nevertheless fixed a problem with decoding
compounds containing write was a bug in the write decoding introduced by
5a80a54d21c96590d013378d8c5f65f879451ab4 "nfsd4: reorganize write
decoding", after which write decoding no longer adhered to the rule that
argp->pagelist point to the next page.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
[bwh: Backported to 3.2: adjust context; there is only one instance to fix]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/nfsd/nfs4xdr.c