Btrfs: fix worker thread double spin_lock_irq
authorChris Mason <chris.mason@oracle.com>
Wed, 16 Sep 2009 00:00:36 +0000 (20:00 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Sep 2009 00:20:17 +0000 (20:20 -0400)
The exit-on-idle code for async worker threads was incorrectly
calling spin_lock_irq with interrupts already off.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/async-thread.c

index 73df627ab8abc0be8dab86a44617629a78d4e20e..80e33bc96c84aa4f9008a522593cfa1375a74408 100644 (file)
@@ -185,7 +185,7 @@ static int try_worker_shutdown(struct btrfs_worker_thread *worker)
        int freeit = 0;
 
        spin_lock_irq(&worker->lock);
-       spin_lock_irq(&worker->workers->lock);
+       spin_lock(&worker->workers->lock);
        if (worker->workers->num_workers > 1 &&
            worker->idle &&
            !worker->working &&
@@ -196,7 +196,7 @@ static int try_worker_shutdown(struct btrfs_worker_thread *worker)
                list_del_init(&worker->worker_list);
                worker->workers->num_workers--;
        }
-       spin_unlock_irq(&worker->workers->lock);
+       spin_unlock(&worker->workers->lock);
        spin_unlock_irq(&worker->lock);
 
        if (freeit)