Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5396c9356efec1d3d818b786f69e081aaad4b98b
Commit:     5396c9356efec1d3d818b786f69e081aaad4b98b
Parent:     30a50cc56679f56d7b866b1c29fd05802606fc5a
Author:     Dave Young <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 31 18:33:10 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 19:28:33 2008 -0800

    [BLUETOOTH]: Fix bugs in previous conn add/del workqueue changes.
    
    Jens Axboe noticed that we were queueing &conn->work on both btaddconn
    and keventd_wq.
    
    Signed-off-by: Dave Young <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/bluetooth/hci_sysfs.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 2726adc..e13cf5e 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -282,6 +282,7 @@ static void add_conn(struct work_struct *work)
        int i;
 
        flush_workqueue(btdelconn);
+
        if (device_add(&conn->dev) < 0) {
                BT_ERR("Failed to register connection device");
                return;
@@ -317,7 +318,6 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
        INIT_WORK(&conn->work, add_conn);
 
        queue_work(btaddconn, &conn->work);
-       schedule_work(&conn->work);
 }
 
 static int __match_tty(struct device *dev, void *data)
@@ -354,7 +354,6 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
        INIT_WORK(&conn->work, del_conn);
 
        queue_work(btdelconn, &conn->work);
-       schedule_work(&conn->work);
 }
 
 int hci_register_sysfs(struct hci_dev *hdev)
@@ -408,6 +407,7 @@ int __init bt_sysfs_init(void)
                err = -ENOMEM;
                goto out;
        }
+
        btdelconn = create_singlethread_workqueue("btdelconn");
        if (!btdelconn) {
                err = -ENOMEM;
@@ -447,8 +447,12 @@ out:
 void bt_sysfs_cleanup(void)
 {
        destroy_workqueue(btaddconn);
+
        destroy_workqueue(btdelconn);
+
        class_destroy(bt_class);
+
        bus_unregister(&bt_bus);
+
        platform_device_unregister(bt_platform);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to