Skip to content
Snippets Groups Projects
Commit 627e421a authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: fix worker thread double spin_lock_irq


The exit-on-idle code for async worker threads was incorrectly
calling spin_lock_irq with interrupts already off.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 3e99d8eb
No related branches found
No related tags found
No related merge requests found
...@@ -185,7 +185,7 @@ static int try_worker_shutdown(struct btrfs_worker_thread *worker) ...@@ -185,7 +185,7 @@ static int try_worker_shutdown(struct btrfs_worker_thread *worker)
int freeit = 0; int freeit = 0;
spin_lock_irq(&worker->lock); spin_lock_irq(&worker->lock);
spin_lock_irq(&worker->workers->lock); spin_lock(&worker->workers->lock);
if (worker->workers->num_workers > 1 && if (worker->workers->num_workers > 1 &&
worker->idle && worker->idle &&
!worker->working && !worker->working &&
...@@ -196,7 +196,7 @@ static int try_worker_shutdown(struct btrfs_worker_thread *worker) ...@@ -196,7 +196,7 @@ static int try_worker_shutdown(struct btrfs_worker_thread *worker)
list_del_init(&worker->worker_list); list_del_init(&worker->worker_list);
worker->workers->num_workers--; worker->workers->num_workers--;
} }
spin_unlock_irq(&worker->workers->lock); spin_unlock(&worker->workers->lock);
spin_unlock_irq(&worker->lock); spin_unlock_irq(&worker->lock);
if (freeit) if (freeit)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment