提交 bfdc587c 编写于 作者: Y Ying Xue 提交者: David S. Miller

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: NYing Xue <ying.xue@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6b923cb7
...@@ -43,7 +43,7 @@ void rds_tcp_state_change(struct sock *sk) ...@@ -43,7 +43,7 @@ void rds_tcp_state_change(struct sock *sk)
struct rds_connection *conn; struct rds_connection *conn;
struct rds_tcp_connection *tc; struct rds_tcp_connection *tc;
read_lock_bh(&sk->sk_callback_lock); read_lock(&sk->sk_callback_lock);
conn = sk->sk_user_data; conn = sk->sk_user_data;
if (!conn) { if (!conn) {
state_change = sk->sk_state_change; state_change = sk->sk_state_change;
...@@ -68,7 +68,7 @@ void rds_tcp_state_change(struct sock *sk) ...@@ -68,7 +68,7 @@ void rds_tcp_state_change(struct sock *sk)
break; break;
} }
out: out:
read_unlock_bh(&sk->sk_callback_lock); read_unlock(&sk->sk_callback_lock);
state_change(sk); state_change(sk);
} }
......
...@@ -114,7 +114,7 @@ void rds_tcp_listen_data_ready(struct sock *sk, int bytes) ...@@ -114,7 +114,7 @@ void rds_tcp_listen_data_ready(struct sock *sk, int bytes)
rdsdebug("listen data ready sk %p\n", sk); rdsdebug("listen data ready sk %p\n", sk);
read_lock_bh(&sk->sk_callback_lock); read_lock(&sk->sk_callback_lock);
ready = sk->sk_user_data; ready = sk->sk_user_data;
if (!ready) { /* check for teardown race */ if (!ready) { /* check for teardown race */
ready = sk->sk_data_ready; ready = sk->sk_data_ready;
...@@ -131,7 +131,7 @@ void rds_tcp_listen_data_ready(struct sock *sk, int bytes) ...@@ -131,7 +131,7 @@ void rds_tcp_listen_data_ready(struct sock *sk, int bytes)
queue_work(rds_wq, &rds_tcp_listen_work); queue_work(rds_wq, &rds_tcp_listen_work);
out: out:
read_unlock_bh(&sk->sk_callback_lock); read_unlock(&sk->sk_callback_lock);
ready(sk, bytes); ready(sk, bytes);
} }
......
...@@ -322,7 +322,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes) ...@@ -322,7 +322,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
rdsdebug("data ready sk %p bytes %d\n", sk, bytes); rdsdebug("data ready sk %p bytes %d\n", sk, bytes);
read_lock_bh(&sk->sk_callback_lock); read_lock(&sk->sk_callback_lock);
conn = sk->sk_user_data; conn = sk->sk_user_data;
if (!conn) { /* check for teardown race */ if (!conn) { /* check for teardown race */
ready = sk->sk_data_ready; ready = sk->sk_data_ready;
...@@ -336,7 +336,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes) ...@@ -336,7 +336,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM) if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM)
queue_delayed_work(rds_wq, &conn->c_recv_w, 0); queue_delayed_work(rds_wq, &conn->c_recv_w, 0);
out: out:
read_unlock_bh(&sk->sk_callback_lock); read_unlock(&sk->sk_callback_lock);
ready(sk, bytes); ready(sk, bytes);
} }
......
...@@ -174,7 +174,7 @@ void rds_tcp_write_space(struct sock *sk) ...@@ -174,7 +174,7 @@ void rds_tcp_write_space(struct sock *sk)
struct rds_connection *conn; struct rds_connection *conn;
struct rds_tcp_connection *tc; struct rds_tcp_connection *tc;
read_lock_bh(&sk->sk_callback_lock); read_lock(&sk->sk_callback_lock);
conn = sk->sk_user_data; conn = sk->sk_user_data;
if (!conn) { if (!conn) {
write_space = sk->sk_write_space; write_space = sk->sk_write_space;
...@@ -194,7 +194,7 @@ void rds_tcp_write_space(struct sock *sk) ...@@ -194,7 +194,7 @@ void rds_tcp_write_space(struct sock *sk)
queue_delayed_work(rds_wq, &conn->c_send_w, 0); queue_delayed_work(rds_wq, &conn->c_send_w, 0);
out: out:
read_unlock_bh(&sk->sk_callback_lock); read_unlock(&sk->sk_callback_lock);
/* /*
* write_space is only called when data leaves tcp's send queue if * write_space is only called when data leaves tcp's send queue if
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册