summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.c
diff options
context:
space:
mode:
authorDavid S. Miller2011-12-30 19:04:14 +0100
committerDavid S. Miller2011-12-30 19:04:14 +0100
commit7f8e3234c5f7fbdb06be050c8a1907e9c36d7c61 (patch)
treed6e9edb2087fa4a97b2cc3d585a0189672a14cf4 /fs/btrfs/async-thread.c
parentipv6: Fix neigh lookup using NULL device. (diff)
parentMerge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/j... (diff)
downloadkernel-qcow2-linux-7f8e3234c5f7fbdb06be050c8a1907e9c36d7c61.tar.gz
kernel-qcow2-linux-7f8e3234c5f7fbdb06be050c8a1907e9c36d7c61.tar.xz
kernel-qcow2-linux-7f8e3234c5f7fbdb06be050c8a1907e9c36d7c61.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r--fs/btrfs/async-thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index cb97174e2366..0b394580d860 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -563,8 +563,8 @@ static struct btrfs_worker_thread *find_worker(struct btrfs_workers *workers)
struct list_head *fallback;
int ret;
-again:
spin_lock_irqsave(&workers->lock, flags);
+again:
worker = next_worker(workers);
if (!worker) {
@@ -579,6 +579,7 @@ again:
spin_unlock_irqrestore(&workers->lock, flags);
/* we're below the limit, start another worker */
ret = __btrfs_start_workers(workers);
+ spin_lock_irqsave(&workers->lock, flags);
if (ret)
goto fallback;
goto again;