* [PATCH] Bluetooth: Remove unnecessary use of hci_dev_list_lock
@ 2011-05-20 18:50 johan.hedberg
2011-05-30 19:18 ` Gustavo F. Padovan
0 siblings, 1 reply; 2+ messages in thread
From: johan.hedberg @ 2011-05-20 18:50 UTC (permalink / raw)
To: linux-bluetooth
From: Johan Hedberg <johan.hedberg@intel.com>
The get_connections function has no need to use hci_dev_list_lock. The
code was there probably because of a copy-paste mistake.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/mgmt.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index dae382c..fe835b8 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1092,8 +1092,6 @@ static int get_connections(struct sock *sk, u16 index)
put_unaligned_le16(count, &rp->conn_count);
- read_lock(&hci_dev_list_lock);
-
i = 0;
list_for_each(p, &hdev->conn_hash.list) {
struct hci_conn *c = list_entry(p, struct hci_conn, list);
@@ -1101,8 +1099,6 @@ static int get_connections(struct sock *sk, u16 index)
bacpy(&rp->conn[i++], &c->dst);
}
- read_unlock(&hci_dev_list_lock);
-
err = cmd_complete(sk, index, MGMT_OP_GET_CONNECTIONS, rp, rp_len);
unlock:
--
1.7.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: Remove unnecessary use of hci_dev_list_lock
2011-05-20 18:50 [PATCH] Bluetooth: Remove unnecessary use of hci_dev_list_lock johan.hedberg
@ 2011-05-30 19:18 ` Gustavo F. Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo F. Padovan @ 2011-05-30 19:18 UTC (permalink / raw)
To: johan.hedberg; +Cc: linux-bluetooth
Hi Johan,
* johan.hedberg@gmail.com <johan.hedberg@gmail.com> [2011-05-20 11:50:41 -0700]:
> From: Johan Hedberg <johan.hedberg@intel.com>
>
> The get_connections function has no need to use hci_dev_list_lock. The
> code was there probably because of a copy-paste mistake.
>
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/mgmt.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
Patch has been applied, thanks.
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-30 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 18:50 [PATCH] Bluetooth: Remove unnecessary use of hci_dev_list_lock johan.hedberg
2011-05-30 19:18 ` Gustavo F. Padovan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.