diff options
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r-- | fs/btrfs/async-thread.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index c1e0b0caf9cc..0b78bf28ff5d 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -262,18 +262,19 @@ static struct btrfs_work *get_next_work(struct btrfs_worker_thread *worker, | |||
262 | struct btrfs_work *work = NULL; | 262 | struct btrfs_work *work = NULL; |
263 | struct list_head *cur = NULL; | 263 | struct list_head *cur = NULL; |
264 | 264 | ||
265 | if (!list_empty(prio_head)) | 265 | if (!list_empty(prio_head)) { |
266 | cur = prio_head->next; | 266 | cur = prio_head->next; |
267 | goto out; | ||
268 | } | ||
267 | 269 | ||
268 | smp_mb(); | 270 | smp_mb(); |
269 | if (!list_empty(&worker->prio_pending)) | 271 | if (!list_empty(&worker->prio_pending)) |
270 | goto refill; | 272 | goto refill; |
271 | 273 | ||
272 | if (!list_empty(head)) | 274 | if (!list_empty(head)) { |
273 | cur = head->next; | 275 | cur = head->next; |
274 | |||
275 | if (cur) | ||
276 | goto out; | 276 | goto out; |
277 | } | ||
277 | 278 | ||
278 | refill: | 279 | refill: |
279 | spin_lock_irq(&worker->lock); | 280 | spin_lock_irq(&worker->lock); |