summaryrefslogtreecommitdiff
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-02-25 19:57:41 +0100
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:17 +0200
commit6c3abeda773040ad2338742b3ee95d93eb5565e1 (patch)
tree441b624149310c623142a84e6cd891814c9566ba /fs/btrfs/scrub.c
parent8de60fe94292c8cdac431537ba315e15cdcafd00 (diff)
downloadlwn-6c3abeda773040ad2338742b3ee95d93eb5565e1.tar.gz
lwn-6c3abeda773040ad2338742b3ee95d93eb5565e1.zip
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>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index a99588536c79..ed471ffbf115 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -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) {
/*