Skip to content

Commit ee65d19

Browse files
author
Gustavo F. Padovan
committed
Bluetooth: Remove *_bh locks from SCO
Those locks are not shared between interrupt and process context anymore, so remove the part that disable interrupts. We are still safe because preemption is disabled. Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
1 parent 393432c commit ee65d19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/bluetooth/sco.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
482482
goto done;
483483
}
484484

485-
write_lock_bh(&sco_sk_list.lock);
485+
write_lock(&sco_sk_list.lock);
486486

487487
if (bacmp(src, BDADDR_ANY) && __sco_get_sock_by_addr(src)) {
488488
err = -EADDRINUSE;
@@ -492,7 +492,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
492492
sk->sk_state = BT_BOUND;
493493
}
494494

495-
write_unlock_bh(&sco_sk_list.lock);
495+
write_unlock(&sco_sk_list.lock);
496496

497497
done:
498498
release_sock(sk);
@@ -965,14 +965,14 @@ static int sco_debugfs_show(struct seq_file *f, void *p)
965965
struct sock *sk;
966966
struct hlist_node *node;
967967

968-
read_lock_bh(&sco_sk_list.lock);
968+
read_lock(&sco_sk_list.lock);
969969

970970
sk_for_each(sk, node, &sco_sk_list.head) {
971971
seq_printf(f, "%s %s %d\n", batostr(&bt_sk(sk)->src),
972972
batostr(&bt_sk(sk)->dst), sk->sk_state);
973973
}
974974

975-
read_unlock_bh(&sco_sk_list.lock);
975+
read_unlock(&sco_sk_list.lock);
976976

977977
return 0;
978978
}

0 commit comments

Comments
 (0)