mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
SUNRPC: Fix a thinko in xs_connect()
commit 99b1a4c32a upstream.
It is rather pointless to test the value of transport->inet after
calling xs_reset_transport(), since it will always be zero, and
so we will never see any exponential back off behaviour.
Also don't force early connections for SOFTCONN tasks. If the server
disconnects us, we should respect the exponential backoff.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0e592fde0a
commit
fc56e1157e
@@ -2216,13 +2216,14 @@ static void xs_connect(struct rpc_xprt *xprt, struct rpc_task *task)
|
|||||||
|
|
||||||
WARN_ON_ONCE(!xprt_lock_connect(xprt, task, transport));
|
WARN_ON_ONCE(!xprt_lock_connect(xprt, task, transport));
|
||||||
|
|
||||||
/* Start by resetting any existing state */
|
if (transport->sock != NULL) {
|
||||||
xs_reset_transport(transport);
|
|
||||||
|
|
||||||
if (transport->sock != NULL && !RPC_IS_SOFTCONN(task)) {
|
|
||||||
dprintk("RPC: xs_connect delayed xprt %p for %lu "
|
dprintk("RPC: xs_connect delayed xprt %p for %lu "
|
||||||
"seconds\n",
|
"seconds\n",
|
||||||
xprt, xprt->reestablish_timeout / HZ);
|
xprt, xprt->reestablish_timeout / HZ);
|
||||||
|
|
||||||
|
/* Start by resetting any existing state */
|
||||||
|
xs_reset_transport(transport);
|
||||||
|
|
||||||
queue_delayed_work(rpciod_workqueue,
|
queue_delayed_work(rpciod_workqueue,
|
||||||
&transport->connect_worker,
|
&transport->connect_worker,
|
||||||
xprt->reestablish_timeout);
|
xprt->reestablish_timeout);
|
||||||
|
|||||||
Reference in New Issue
Block a user