summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-05-13 00:41:39 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-13 01:43:52 -0400
commitb4411457d5c9062f07f0762f1ddb513d90dd1379 (patch)
tree7fe7d192c2b64f19f66aef83548f224622c68e28 /net
parente7142c341c9ce3678f3533a2cfbf8477a09a95ad (diff)
sunrpc: set SOCK_FASYNC
sunrpc is using SOCKWQ_ASYNC_NOSPACE without setting SOCK_FASYNC, so the recent optimizations done in sk_set_bit() and sk_clear_bit() broke it. There is still the risk that a subsequent sock_fasync() call would clear SOCK_FASYNC, but sunrpc does not use this yet. Fixes: 9317bb69824e ("net: SOCKWQ_ASYNC_NOSPACE optimizations") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Jiri Pirko <jiri@resnulli.us> Reported-by: Huang, Ying <ying.huang@intel.com> Tested-by: Jiri Pirko <jiri@resnulli.us> Tested-by: Huang, Ying <ying.huang@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtsock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index a6c68dc086af..b90c5397b5e1 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1950,6 +1950,7 @@ static int xs_local_finish_connecting(struct rpc_xprt *xprt,
1950 sk->sk_user_data = xprt; 1950 sk->sk_user_data = xprt;
1951 sk->sk_data_ready = xs_data_ready; 1951 sk->sk_data_ready = xs_data_ready;
1952 sk->sk_write_space = xs_udp_write_space; 1952 sk->sk_write_space = xs_udp_write_space;
1953 sock_set_flag(sk, SOCK_FASYNC);
1953 sk->sk_error_report = xs_error_report; 1954 sk->sk_error_report = xs_error_report;
1954 sk->sk_allocation = GFP_NOIO; 1955 sk->sk_allocation = GFP_NOIO;
1955 1956
@@ -2136,6 +2137,7 @@ static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
2136 sk->sk_user_data = xprt; 2137 sk->sk_user_data = xprt;
2137 sk->sk_data_ready = xs_data_ready; 2138 sk->sk_data_ready = xs_data_ready;
2138 sk->sk_write_space = xs_udp_write_space; 2139 sk->sk_write_space = xs_udp_write_space;
2140 sock_set_flag(sk, SOCK_FASYNC);
2139 sk->sk_allocation = GFP_NOIO; 2141 sk->sk_allocation = GFP_NOIO;
2140 2142
2141 xprt_set_connected(xprt); 2143 xprt_set_connected(xprt);
@@ -2237,6 +2239,7 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
2237 sk->sk_data_ready = xs_tcp_data_ready; 2239 sk->sk_data_ready = xs_tcp_data_ready;
2238 sk->sk_state_change = xs_tcp_state_change; 2240 sk->sk_state_change = xs_tcp_state_change;
2239 sk->sk_write_space = xs_tcp_write_space; 2241 sk->sk_write_space = xs_tcp_write_space;
2242 sock_set_flag(sk, SOCK_FASYNC);
2240 sk->sk_error_report = xs_error_report; 2243 sk->sk_error_report = xs_error_report;
2241 sk->sk_allocation = GFP_NOIO; 2244 sk->sk_allocation = GFP_NOIO;
2242 2245