Skip to contentSkip to conversation

Bluetooth: Replace SCO bh_lock_sock with lock_sock

PATCH New Marcel Holtmann 1 participant 1 message Jul 13, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Replace SCO bh_lock_sock with lock_sock

The callers are coming all from workqueue context and there seems to be no need to use bh_lock_sock. Use lock_sock instead. The only user of bh_lock_sock should be the one from sk_timer timeout.

---
 net/bluetooth/sco.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
net/bluetooth/sco.c +7 -7
index 62046519f4aa..c0e0fc7402fb 100644
@@ -170,10 +170,10 @@ static int sco_conn_del(struct hci_conn *hcon, int err)
 	sco_conn_unlock(conn);
 
 	if (sk) {
-		bh_lock_sock(sk);
+		lock_sock(sk);
 		sco_sock_clear_timer(sk);
 		sco_chan_del(sk, err);
-		bh_unlock_sock(sk);
+		release_sock(sk);
 		sco_sock_kill(sk);
 	}
 
@@ -1010,10 +1010,10 @@ static void sco_conn_ready(struct sco_conn *conn)
 
 	if (sk) {
 		sco_sock_clear_timer(sk);
-		bh_lock_sock(sk);
+		lock_sock(sk);
 		sk->sk_state = BT_CONNECTED;
 		sk->sk_state_change(sk);
-		bh_unlock_sock(sk);
+		release_sock(sk);
 	} else {
 		sco_conn_lock(conn);
 
@@ -1023,12 +1023,12 @@ static void sco_conn_ready(struct sco_conn *conn)
 			return;
 		}
 
-		bh_lock_sock(parent);
+		lock_sock(parent);
 
 		sk = sco_sock_alloc(sock_net(parent), NULL,
 				    BTPROTO_SCO, GFP_ATOMIC);
 		if (!sk) {
-			bh_unlock_sock(parent);
+			release_sock(parent);
 			sco_conn_unlock(conn);
 			return;
 		}
@@ -1049,7 +1049,7 @@ static void sco_conn_ready(struct sco_conn *conn)
 		/* Wake up parent */
 		parent->sk_data_ready(parent);
 
-		bh_unlock_sock(parent);
+		release_sock(parent);
 
 		sco_conn_unlock(conn);
 	}
Signature · 1 line
1.9.3