From: Anand Jain Date: Fri, 14 Aug 2015 10:32:56 +0000 (+0800) Subject: Btrfs: use BTRFS_ERROR_DEV_MISSING_NOT_FOUND when missing device is not found X-Git-Tag: v4.4-rc1~82^2~39^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d74a625987a134b00749e3912bdb6d3ac83fd71d;p=karo-tx-linux.git 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 Signed-off-by: David Sterba --- 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 {