summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-08-22 23:55:46 +0200
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 21:35:14 +0200
commitedc81dcd5b7f699c4049042b35c904396642032e (patch)
tree7d3e956afe26fa86a2fa7ed1063eccac4ad61ff7 /net/sunrpc/clnt.c
parentSUNRPC: Rename xprt->recv_lock to xprt->queue_lock (diff)
downloadlinux-edc81dcd5b7f699c4049042b35c904396642032e.tar.xz
linux-edc81dcd5b7f699c4049042b35c904396642032e.zip
SUNRPC: Refactor xprt_transmit() to remove the reply queue code
Separate out the action of adding a request to the reply queue so that the backchannel code can simply skip calling it altogether. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index a858366cd15d..414966273a3f 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1962,6 +1962,11 @@ call_transmit(struct rpc_task *task)
return;
}
}
+
+ /* Add task to reply queue before transmission to avoid races */
+ if (rpc_reply_expected(task))
+ xprt_request_enqueue_receive(task);
+
if (!xprt_prepare_transmit(task))
return;
task->tk_action = call_transmit_status;