summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust2019-07-18 03:22:38 +0200
committerTrond Myklebust2019-07-18 20:43:52 +0200
commit75369089820473eac45e9ddd970081901a373c08 (patch)
tree348fdb310218b444e10e0d88ebfef28c2e9242a0 /net/sunrpc/xprt.c
parentpnfs/flexfiles: Fix PTR_ERR() dereferences in ff_layout_track_ds_error (diff)
downloadkernel-qcow2-linux-75369089820473eac45e9ddd970081901a373c08.tar.gz
kernel-qcow2-linux-75369089820473eac45e9ddd970081901a373c08.tar.xz
kernel-qcow2-linux-75369089820473eac45e9ddd970081901a373c08.zip
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: 277e4ab7d530 ("SUNRPC: Simplify TCP receive code by switching...") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: stable@vger.kernel.org # v4.20+
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 70a704c44c6d..783748dc5e6f 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1041,6 +1041,8 @@ xprt_request_enqueue_receive(struct rpc_task *task)
if (!xprt_request_need_enqueue_receive(task, req))
return;
+
+ xprt_request_prepare(task->tk_rqstp);
spin_lock(&xprt->queue_lock);
/* Update the softirq receive buffer */