From: Andre Guedes Date: Fri, 27 Jan 2012 22:42:03 +0000 (-0300) Subject: Bluetooth: Remove unneeded locking X-Git-Tag: v3.3.3~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cb14d84e9e4afbb1547969b923640f39eb1db84;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: Remove unneeded locking commit e72acc13c770a82b4ce4a07e9716f29320eae0f8 upstream. We don't need locking hdev in hci_conn_timeout() since it doesn't access any hdev's shared resources, it basically queues HCI commands. Signed-off-by: Andre Guedes Signed-off-by: Vinicius Costa Gomes Reviewed-by: Ulisses Furquim Acked-by: Marcel Holtmann Signed-off-by: Johan Hedberg Tested-by: Alexander Holler [reported to fix lockups on battery-powered bluetooth devices - gregkh] Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 07bc69ed9498c..280953bf9927b 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -279,7 +279,6 @@ static void hci_conn_timeout(struct work_struct *work) { struct hci_conn *conn = container_of(work, struct hci_conn, disc_work.work); - struct hci_dev *hdev = conn->hdev; __u8 reason; BT_DBG("conn %p state %d", conn, conn->state); @@ -287,8 +286,6 @@ static void hci_conn_timeout(struct work_struct *work) if (atomic_read(&conn->refcnt)) return; - hci_dev_lock(hdev); - switch (conn->state) { case BT_CONNECT: case BT_CONNECT2: @@ -308,8 +305,6 @@ static void hci_conn_timeout(struct work_struct *work) conn->state = BT_CLOSED; break; } - - hci_dev_unlock(hdev); } /* Enter sniff mode */