diff options
-rw-r--r-- | fs/btrfs/async-thread.c | 14 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 04fb9702d14c..d82efd722a48 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -302,8 +302,20 @@ int btrfs_requeue_work(struct btrfs_work *work) | |||
302 | spin_lock_irqsave(&worker->lock, flags); | 302 | spin_lock_irqsave(&worker->lock, flags); |
303 | atomic_inc(&worker->num_pending); | 303 | atomic_inc(&worker->num_pending); |
304 | list_add_tail(&work->list, &worker->pending); | 304 | list_add_tail(&work->list, &worker->pending); |
305 | check_busy_worker(worker); | 305 | |
306 | /* by definition we're busy, take ourselves off the idle | ||
307 | * list | ||
308 | */ | ||
309 | if (worker->idle) { | ||
310 | spin_lock_irqsave(&worker->workers->lock, flags); | ||
311 | worker->idle = 0; | ||
312 | list_move_tail(&worker->worker_list, | ||
313 | &worker->workers->worker_list); | ||
314 | spin_unlock_irqrestore(&worker->workers->lock, flags); | ||
315 | } | ||
316 | |||
306 | spin_unlock_irqrestore(&worker->lock, flags); | 317 | spin_unlock_irqrestore(&worker->lock, flags); |
318 | |||
307 | out: | 319 | out: |
308 | return 0; | 320 | return 0; |
309 | } | 321 | } |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 64e14ddf6232..677d5e774fad 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -5145,6 +5145,8 @@ int btrfs_read_block_groups(struct btrfs_root *root) | |||
5145 | 5145 | ||
5146 | ret = btrfs_add_block_group_cache(root->fs_info, cache); | 5146 | ret = btrfs_add_block_group_cache(root->fs_info, cache); |
5147 | BUG_ON(ret); | 5147 | BUG_ON(ret); |
5148 | |||
5149 | set_avail_alloc_bits(root->fs_info, cache->flags); | ||
5148 | } | 5150 | } |
5149 | ret = 0; | 5151 | ret = 0; |
5150 | error: | 5152 | error: |