summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-10 09:22:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-10 09:22:34 +0100
commitc4aa8b2a8b63a269d63acafc0358a7b9f5d9e563 (patch)
treed04a7861e542665bb7c03aac729a72c957be8abc /net/sunrpc/xprt.c
parent48d365de7746a000afd7f9f7cc1821cbb6fe9b45 (diff)
parent40e020c129cfc991e8ab4736d2665351ffd1468d (diff)
downloadblackbird-op-linux-c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563.tar.gz
blackbird-op-linux-c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563.zip
Merge 4.20-rc6 into char-misc-next
This should resolve the hv driver merge conflict. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 86bea4520c4d..ce927002862a 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -826,8 +826,15 @@ void xprt_connect(struct rpc_task *task)
return;
if (xprt_test_and_set_connecting(xprt))
return;
- xprt->stat.connect_start = jiffies;
- xprt->ops->connect(xprt, task);
+ /* Race breaker */
+ if (!xprt_connected(xprt)) {
+ xprt->stat.connect_start = jiffies;
+ xprt->ops->connect(xprt, task);
+ } else {
+ xprt_clear_connecting(xprt);
+ task->tk_status = 0;
+ rpc_wake_up_queued_task(&xprt->pending, task);
+ }
}
xprt_release_write(xprt, task);
}
@@ -1623,6 +1630,8 @@ xprt_request_init(struct rpc_task *task)
req->rq_snd_buf.buflen = 0;
req->rq_rcv_buf.len = 0;
req->rq_rcv_buf.buflen = 0;
+ req->rq_snd_buf.bvec = NULL;
+ req->rq_rcv_buf.bvec = NULL;
req->rq_release_snd_buf = NULL;
xprt_reset_majortimeo(req);
dprintk("RPC: %5u reserved req %p xid %08x\n", task->tk_pid,
OpenPOWER on IntegriCloud