aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 e138af710de2..c6938b45e0fd 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -597,10 +597,8 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
597 set_blocksize(bdev, 4096); 597 set_blocksize(bdev, 4096);
598 598
599 bh = btrfs_read_dev_super(bdev); 599 bh = btrfs_read_dev_super(bdev);
600 if (!bh) { 600 if (!bh)
601 ret = -EINVAL;
602 goto error_close; 601 goto error_close;
603 }
604 602
605 disk_super = (struct btrfs_super_block *)bh->b_data; 603 disk_super = (struct btrfs_super_block *)bh->b_data;
606 devid = btrfs_stack_device_id(&disk_super->dev_item); 604 devid = btrfs_stack_device_id(&disk_super->dev_item);
@@ -655,7 +653,7 @@ error:
655 continue; 653 continue;
656 } 654 }
657 if (fs_devices->open_devices == 0) { 655 if (fs_devices->open_devices == 0) {
658 ret = -EIO; 656 ret = -EINVAL;
659 goto out; 657 goto out;
660 } 658 }
661 fs_devices->seeding = seeding; 659 fs_devices->seeding = seeding;