Skip to contentSkip to conversation

sunrpc: Be sure to clear XPRT_WRITE_SPACE when resetting the transport

PATCH In review Scott Mayhew 2 participants 2 messages Dec 14, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunrpc: Be sure to clear XPRT_WRITE_SPACE when resetting the transport

Otherwise no RPC tasks will be able to lock the transport and will therefore be unable to connect it either.

---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 8a5e823e0b33..bbe06e3cc853 100644
@@ -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();
 }
Signature · 1 line
2.17.1
#1 lore raw
Quoted 20 lines · Scott Mayhew

Otherwise no RPC tasks will be able to lock the transport and will therefore be unable to connect it either.

---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 8a5e823e0b33..bbe06e3cc853 100644
@@ -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();
Quoted 1 line

}

Yep, this make sense. Thanks!

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]