From: Anand Jain Date: Thu, 7 May 2015 20:34:35 +0000 (+0800) Subject: Btrfs: check error before reporting missing device and add uuid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33b97e43279a60729eee502809cf5269b3a64cf3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Btrfs: check error before reporting missing device and add uuid Report missing device when add is successful, otherwise it would exit as ENOMEM. And add uuid to the report. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 38d3a0f3bcdd..403ed1fdd901 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6230,10 +6230,11 @@ static int read_one_dev(struct btrfs_root *root, if (!btrfs_test_opt(root, DEGRADED)) return -EIO; - btrfs_warn(root->fs_info, "devid %llu missing", devid); device = add_missing_dev(root, fs_devices, devid, dev_uuid); if (!device) return -ENOMEM; + btrfs_warn(root->fs_info, "devid %llu uuid %pU missing", + devid, dev_uuid); } else { if (!device->bdev && !btrfs_test_opt(root, DEGRADED)) return -EIO;