Wang Shilong 3b7a016f44 Btrfs: avoid unnecessary scrub workers allocation
We only allocate scrub workers if we pass all the necessary
checks, for example, there are no operation in progress.

Besides, move mutex lock protection outside of scrub_workers_get()
/scrub_workers_put().

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-11 22:12:58 -05:00
..
2013-11-11 22:02:51 -05:00
2013-06-29 12:57:00 +04:00
2013-11-11 22:03:19 -05:00
2013-11-11 22:10:36 -05:00
2013-11-11 22:03:19 -05:00
2012-10-09 09:14:45 -04:00
2013-09-01 08:16:32 -04:00
2013-03-14 14:57:10 -04:00
2013-11-11 21:57:30 -05:00
2013-11-11 22:03:19 -05:00
2013-02-01 14:24:23 -05:00
2013-11-11 22:11:26 -05:00
2012-10-09 09:19:57 -04:00