提交 37e1c55d 编写于 作者: J Johan Hedberg 提交者: Gustavo F. Padovan

Bluetooth: Remove unnecessary use of hci_dev_list_lock

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: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
上级 75fde9ee
...@@ -1092,8 +1092,6 @@ static int get_connections(struct sock *sk, u16 index) ...@@ -1092,8 +1092,6 @@ static int get_connections(struct sock *sk, u16 index)
put_unaligned_le16(count, &rp->conn_count); put_unaligned_le16(count, &rp->conn_count);
read_lock(&hci_dev_list_lock);
i = 0; i = 0;
list_for_each(p, &hdev->conn_hash.list) { list_for_each(p, &hdev->conn_hash.list) {
struct hci_conn *c = list_entry(p, struct hci_conn, 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) ...@@ -1101,8 +1099,6 @@ static int get_connections(struct sock *sk, u16 index)
bacpy(&rp->conn[i++], &c->dst); bacpy(&rp->conn[i++], &c->dst);
} }
read_unlock(&hci_dev_list_lock);
err = cmd_complete(sk, index, MGMT_OP_GET_CONNECTIONS, rp, rp_len); err = cmd_complete(sk, index, MGMT_OP_GET_CONNECTIONS, rp, rp_len);
unlock: unlock:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册