btrfs: always choose work from prio_head first
authorStanislaw Gruszka <stf_xl@wp.pl>
Sat, 8 Feb 2014 22:18:43 +0000 (23:18 +0100)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:16:36 +0000 (15:16 -0400)
In case we do not refill, we can overwrite cur pointer from prio_head
by one from not prioritized head, what looks as something that was
not intended.

This change make we always take works from prio_head first until it's
not empty.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Josef Bacik <jbacik@fb.com>
fs/btrfs/async-thread.c

Simple merge