mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 18:55:12 +00:00
SUNRPC: xs_reset_transport must mark the connection as disconnected
commit0c78789e3a
upstream. In case the reconnection attempt fails. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> [bwh: Backported to 3.2: add local variable xprt] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> (cherry picked from commit9434e4855e
) Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
1c16d9c6fc
commit
7af536c9e9
@ -734,6 +734,7 @@ static void xs_reset_transport(struct sock_xprt *transport)
|
||||
{
|
||||
struct socket *sock = transport->sock;
|
||||
struct sock *sk = transport->inet;
|
||||
struct rpc_xprt *xprt = &transport->xprt;
|
||||
|
||||
if (sk == NULL)
|
||||
return;
|
||||
@ -747,6 +748,7 @@ static void xs_reset_transport(struct sock_xprt *transport)
|
||||
sk->sk_user_data = NULL;
|
||||
|
||||
xs_restore_old_callbacks(transport, sk);
|
||||
xprt_clear_connected(xprt);
|
||||
write_unlock_bh(&sk->sk_callback_lock);
|
||||
|
||||
sk->sk_no_check = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user