btrfs: scrub: return EAGAIN when fs is closing

The error code used here is wrong as it's not invalid to try to start
scrub when umount has begun.  Returning EAGAIN is more user friendly as
it's recoverable.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2019-02-25 19:57:41 +01:00
parent 8de60fe942
commit 6c3abeda77

View file

@ -3791,7 +3791,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
struct btrfs_workqueue *scrub_parity = NULL;
if (btrfs_fs_closing(fs_info))
return -EINVAL;
return -EAGAIN;
if (fs_info->nodesize > BTRFS_STRIPE_LEN) {
/*