Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee65d19e authored by Gustavo Padovan's avatar Gustavo Padovan
Browse files

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: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 393432cd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -482,7 +482,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
		goto done;
	}

	write_lock_bh(&sco_sk_list.lock);
	write_lock(&sco_sk_list.lock);

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

	write_unlock_bh(&sco_sk_list.lock);
	write_unlock(&sco_sk_list.lock);

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

	read_lock_bh(&sco_sk_list.lock);
	read_lock(&sco_sk_list.lock);

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

	read_unlock_bh(&sco_sk_list.lock);
	read_unlock(&sco_sk_list.lock);

	return 0;
}