Commit 6c3abeda authored by David Sterba's avatar David Sterba
Browse files

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: default avatarDavid Sterba <dsterba@suse.com>
parent 8de60fe9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
		/*