diff mbox series

sunrpc: Be sure to clear XPRT_WRITE_SPACE when resetting the transport

Message ID 20181214182956.14643-1-smayhew@redhat.com (mailing list archive)
State New, archived
Headers show
Series sunrpc: Be sure to clear XPRT_WRITE_SPACE when resetting the transport | expand

Commit Message

Scott Mayhew Dec. 14, 2018, 6:29 p.m. UTC
Otherwise no RPC tasks will be able to lock the transport and will
therefore be unable to connect it either.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Trond Myklebust Dec. 14, 2018, 9:33 p.m. UTC | #1
On Fri, 2018-12-14 at 13:29 -0500, Scott Mayhew wrote:
> Otherwise no RPC tasks will be able to lock the transport and will
> therefore be unable to connect it either.
> 
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
>  net/sunrpc/xprtsock.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index 8a5e823e0b33..bbe06e3cc853 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -1157,6 +1157,7 @@ static void
> xs_sock_reset_connection_flags(struct rpc_xprt *xprt)
>  	smp_mb__before_atomic();
>  	clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
>  	clear_bit(XPRT_CLOSING, &xprt->state);
> +	clear_bit(XPRT_WRITE_SPACE, &xprt->state);
>  	xs_sock_reset_state_flags(xprt);
>  	smp_mb__after_atomic();
>  }

Yep, this make sense. Thanks!
diff mbox series

Patch

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 8a5e823e0b33..bbe06e3cc853 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1157,6 +1157,7 @@  static void xs_sock_reset_connection_flags(struct rpc_xprt *xprt)
 	smp_mb__before_atomic();
 	clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
 	clear_bit(XPRT_CLOSING, &xprt->state);
+	clear_bit(XPRT_WRITE_SPACE, &xprt->state);
 	xs_sock_reset_state_flags(xprt);
 	smp_mb__after_atomic();
 }