Btrfs: fix __btrfs_start_workers retval
authorIlya Dryomov <idryomov@gmail.com>
Sun, 3 Nov 2013 17:06:40 +0000 (19:06 +0200)
committerChris Mason <chris.mason@fusionio.com>
Thu, 21 Nov 2013 01:42:11 +0000 (20:42 -0500)
commitba69994a40b242bef26ab2683ea84aa29e2e429f
tree9a2b0597ce5668821472606355f41cee8fd10f05
parent908960c6c0fb3b3ce3971dc0ca47b581d256b968
Btrfs: fix __btrfs_start_workers retval

__btrfs_start_workers returns 0 in case it raced with
btrfs_stop_workers and lost the race.  This is wrong because worker in
this case is not allowed to start and is in fact destroyed.  Return
-EINVAL instead.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/async-thread.c