Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rds: Don't disable BH on BH context

Since we have already in BH context when *_write_space(),
*_data_ready() as well as *_state_change() are called, it's
unnecessary to disable BH.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ying Xue and committed by
David S. Miller
bfdc587c 6b923cb7

+8 -8
+2 -2
net/rds/tcp_connect.c
··· 43 43 struct rds_connection *conn; 44 44 struct rds_tcp_connection *tc; 45 45 46 - read_lock_bh(&sk->sk_callback_lock); 46 + read_lock(&sk->sk_callback_lock); 47 47 conn = sk->sk_user_data; 48 48 if (!conn) { 49 49 state_change = sk->sk_state_change; ··· 68 68 break; 69 69 } 70 70 out: 71 - read_unlock_bh(&sk->sk_callback_lock); 71 + read_unlock(&sk->sk_callback_lock); 72 72 state_change(sk); 73 73 } 74 74
+2 -2
net/rds/tcp_listen.c
··· 114 114 115 115 rdsdebug("listen data ready sk %p\n", sk); 116 116 117 - read_lock_bh(&sk->sk_callback_lock); 117 + read_lock(&sk->sk_callback_lock); 118 118 ready = sk->sk_user_data; 119 119 if (!ready) { /* check for teardown race */ 120 120 ready = sk->sk_data_ready; ··· 131 131 queue_work(rds_wq, &rds_tcp_listen_work); 132 132 133 133 out: 134 - read_unlock_bh(&sk->sk_callback_lock); 134 + read_unlock(&sk->sk_callback_lock); 135 135 ready(sk, bytes); 136 136 } 137 137
+2 -2
net/rds/tcp_recv.c
··· 322 322 323 323 rdsdebug("data ready sk %p bytes %d\n", sk, bytes); 324 324 325 - read_lock_bh(&sk->sk_callback_lock); 325 + read_lock(&sk->sk_callback_lock); 326 326 conn = sk->sk_user_data; 327 327 if (!conn) { /* check for teardown race */ 328 328 ready = sk->sk_data_ready; ··· 336 336 if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM) 337 337 queue_delayed_work(rds_wq, &conn->c_recv_w, 0); 338 338 out: 339 - read_unlock_bh(&sk->sk_callback_lock); 339 + read_unlock(&sk->sk_callback_lock); 340 340 ready(sk, bytes); 341 341 } 342 342
+2 -2
net/rds/tcp_send.c
··· 174 174 struct rds_connection *conn; 175 175 struct rds_tcp_connection *tc; 176 176 177 - read_lock_bh(&sk->sk_callback_lock); 177 + read_lock(&sk->sk_callback_lock); 178 178 conn = sk->sk_user_data; 179 179 if (!conn) { 180 180 write_space = sk->sk_write_space; ··· 194 194 queue_delayed_work(rds_wq, &conn->c_send_w, 0); 195 195 196 196 out: 197 - read_unlock_bh(&sk->sk_callback_lock); 197 + read_unlock(&sk->sk_callback_lock); 198 198 199 199 /* 200 200 * write_space is only called when data leaves tcp's send queue if