mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
SUNRPC: xs_reset_transport must mark the connection as disconnected
commit 0c78789e3a030615c6650fde89546cadf40ec2cc upstream. In case the reconnection attempt fails. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> [lizf: Backported to 3.4: add definition of variable xprt] Signed-off-by: Zefan Li <lizefan@huawei.com>
This commit is contained in:
parent
5b59369813
commit
84c2e63639
1 changed files with 2 additions and 0 deletions
|
@ -811,6 +811,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;
|
||||
|
@ -824,6 +825,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 a new issue