aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 25a3dcf15cae..402a7e9a16b7 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -893,11 +893,11 @@ static void xs_close(struct rpc_xprt *xprt)
893 xs_reset_transport(transport); 893 xs_reset_transport(transport);
894 xprt->reestablish_timeout = 0; 894 xprt->reestablish_timeout = 0;
895 895
896 smp_mb__before_clear_bit(); 896 smp_mb__before_atomic();
897 clear_bit(XPRT_CONNECTION_ABORT, &xprt->state); 897 clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
898 clear_bit(XPRT_CLOSE_WAIT, &xprt->state); 898 clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
899 clear_bit(XPRT_CLOSING, &xprt->state); 899 clear_bit(XPRT_CLOSING, &xprt->state);
900 smp_mb__after_clear_bit(); 900 smp_mb__after_atomic();
901 xprt_disconnect_done(xprt); 901 xprt_disconnect_done(xprt);
902} 902}
903 903
@@ -1497,12 +1497,12 @@ static void xs_tcp_cancel_linger_timeout(struct rpc_xprt *xprt)
1497 1497
1498static void xs_sock_reset_connection_flags(struct rpc_xprt *xprt) 1498static void xs_sock_reset_connection_flags(struct rpc_xprt *xprt)
1499{ 1499{
1500 smp_mb__before_clear_bit(); 1500 smp_mb__before_atomic();
1501 clear_bit(XPRT_CONNECTION_ABORT, &xprt->state); 1501 clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
1502 clear_bit(XPRT_CONNECTION_CLOSE, &xprt->state); 1502 clear_bit(XPRT_CONNECTION_CLOSE, &xprt->state);
1503 clear_bit(XPRT_CLOSE_WAIT, &xprt->state); 1503 clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
1504 clear_bit(XPRT_CLOSING, &xprt->state); 1504 clear_bit(XPRT_CLOSING, &xprt->state);
1505 smp_mb__after_clear_bit(); 1505 smp_mb__after_atomic();
1506} 1506}
1507 1507
1508static void xs_sock_mark_closed(struct rpc_xprt *xprt) 1508static void xs_sock_mark_closed(struct rpc_xprt *xprt)
@@ -1556,10 +1556,10 @@ static void xs_tcp_state_change(struct sock *sk)
1556 xprt->connect_cookie++; 1556 xprt->connect_cookie++;
1557 xprt->reestablish_timeout = 0; 1557 xprt->reestablish_timeout = 0;
1558 set_bit(XPRT_CLOSING, &xprt->state); 1558 set_bit(XPRT_CLOSING, &xprt->state);
1559 smp_mb__before_clear_bit(); 1559 smp_mb__before_atomic();
1560 clear_bit(XPRT_CONNECTED, &xprt->state); 1560 clear_bit(XPRT_CONNECTED, &xprt->state);
1561 clear_bit(XPRT_CLOSE_WAIT, &xprt->state); 1561 clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
1562 smp_mb__after_clear_bit(); 1562 smp_mb__after_atomic();
1563 xs_tcp_schedule_linger_timeout(xprt, xs_tcp_fin_timeout); 1563 xs_tcp_schedule_linger_timeout(xprt, xs_tcp_fin_timeout);
1564 break; 1564 break;
1565 case TCP_CLOSE_WAIT: 1565 case TCP_CLOSE_WAIT:
@@ -1578,9 +1578,9 @@ static void xs_tcp_state_change(struct sock *sk)
1578 case TCP_LAST_ACK: 1578 case TCP_LAST_ACK:
1579 set_bit(XPRT_CLOSING, &xprt->state); 1579 set_bit(XPRT_CLOSING, &xprt->state);
1580 xs_tcp_schedule_linger_timeout(xprt, xs_tcp_fin_timeout); 1580 xs_tcp_schedule_linger_timeout(xprt, xs_tcp_fin_timeout);
1581 smp_mb__before_clear_bit(); 1581 smp_mb__before_atomic();
1582 clear_bit(XPRT_CONNECTED, &xprt->state); 1582 clear_bit(XPRT_CONNECTED, &xprt->state);
1583 smp_mb__after_clear_bit(); 1583 smp_mb__after_atomic();
1584 break; 1584 break;
1585 case TCP_CLOSE: 1585 case TCP_CLOSE:
1586 xs_tcp_cancel_linger_timeout(xprt); 1586 xs_tcp_cancel_linger_timeout(xprt);