Skip to content

Commit

Permalink
Btrfs: fix worker thread double spin_lock_irq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Mason committed Sep 16, 2009
1 parent 3e99d8e commit 627e421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/async-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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)
Expand Down

0 comments on commit 627e421

Please sign in to comment.