mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-18 21:14:28 +00:00
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>
This commit is contained in:
parent
1982162bbe
commit
0ebc181884
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue