aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2015-08-14 18:32:56 +0800
committerDavid Sterba <dsterba@suse.com>2015-10-01 16:47:16 +0200
commitd74a625987a134b00749e3912bdb6d3ac83fd71d (patch)
tree5c659faacdb63e09d165a23967da2a58292f5d72 /fs/btrfs/volumes.c
parentBtrfs: consolidate btrfs_error() to btrfs_std_error() (diff)
downloadlinux-dev-d74a625987a134b00749e3912bdb6d3ac83fd71d.tar.xz
linux-dev-d74a625987a134b00749e3912bdb6d3ac83fd71d.zip
Btrfs: use BTRFS_ERROR_DEV_MISSING_NOT_FOUND when missing device is not found
Use btrfs specific error code BTRFS_ERROR_DEV_MISSING_NOT_FOUND instead of -ENOENT. Next this removes the logging when user specifies "missing" and we don't find it in the kernel device list. Logging are for system events not for user input errors. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 99f294cfdcc0..c3e2591dd742 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2041,10 +2041,8 @@ int btrfs_find_device_missing_or_by_path(struct btrfs_root *root,
}
}
- if (!*device) {
- btrfs_err(root->fs_info, "no missing device found");
- return -ENOENT;
- }
+ if (!*device)
+ return BTRFS_ERROR_DEV_MISSING_NOT_FOUND;
return 0;
} else {