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>
This commit is contained in:
Trond Myklebust
2018-08-22 17:55:46 -04:00
parent 75c84151a9
commit edc81dcd5b
5 changed files with 89 additions and 46 deletions

View File

@@ -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;