diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-11-06 11:35:33 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-19 16:50:27 (GMT) |
commit | 0ebc181884e8f538c4786840ed4abef828d4dc9b (patch) | |
tree | b9dbd5aef7bc312078166371215ea495e02105b3 /net/bluetooth | |
parent | 1982162bbe20672941897566f2f42d51a306a155 (diff) | |
download | linux-0ebc181884e8f538c4786840ed4abef828d4dc9b.tar.xz |
Bluetooth: Add clarifying comment why schedule_work is used
It's not obvious why schedule_work is used instead of queue_work. Add
a comment explaining why.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_conn.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 85b82f7..fd6120a 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -178,6 +178,10 @@ static void hci_connect_le_scan_remove(struct hci_conn *conn) hci_dev_hold(conn->hdev); hci_conn_get(conn); + /* Even though we hold a reference to the hdev, many other + * things might get cleaned up meanwhile, including the hdev's + * own workqueue, so we can't use that for scheduling. + */ schedule_work(&conn->le_scan_cleanup); } |