diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-10 09:22:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-10 09:22:34 +0100 |
commit | c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563 (patch) | |
tree | d04a7861e542665bb7c03aac729a72c957be8abc /net/sunrpc/xprt.c | |
parent | 48d365de7746a000afd7f9f7cc1821cbb6fe9b45 (diff) | |
parent | 40e020c129cfc991e8ab4736d2665351ffd1468d (diff) | |
download | blackbird-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.c | 13 |
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, |