SUNRPC: Ensure the bvecs are reset when we re-encode the RPC request
The bvec tracks the list of pages, so if the number of pages changes
due to a re-encode, we need to reset the bvec as well.
Fixes: 277e4ab7d5
("SUNRPC: Simplify TCP receive code by switching...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.20+
This commit is contained in:
@@ -909,6 +909,7 @@ static int xs_nospace(struct rpc_rqst *req)
|
||||
static void
|
||||
xs_stream_prepare_request(struct rpc_rqst *req)
|
||||
{
|
||||
xdr_free_bvec(&req->rq_rcv_buf);
|
||||
req->rq_task->tk_status = xdr_alloc_bvec(&req->rq_rcv_buf, GFP_KERNEL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user