]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - net/bluetooth/hci_request.c
Bluetooth: Simplify request cleanup code
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 12 Nov 2015 13:15:00 +0000 (15:15 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Nov 2015 16:50:32 +0000 (17:50 +0100)
commit7df0f73ece45c2e499b416cbc90949e0226eb134
treee07322a53cfadfec37c14ede429ddcb0d4ced240
parente2caced40734731e2a17b501840809e30a08141a
Bluetooth: Simplify request cleanup code

The hci_req_sync_cancel() is just as much related to the request
cleanup as hci_request_cancel_all() is. Just move the former into the
latter and do the cleanup from a single place in hci_dev_do_close().
The important thing is to avoid deadlocks by holding the req_sync
lock: previously hci_request_cancel_all was done right after releasing
the lock and with this patch it's right before taking it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c
net/bluetooth/hci_request.c