Commit 1ed802c9 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: drop useless goto in open_fs_devices

There is no need of goto out in open_fs_devices() as there is nothing
special done there.
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0bc2d3c0
...@@ -1185,7 +1185,6 @@ static int open_fs_devices(struct btrfs_fs_devices *fs_devices, ...@@ -1185,7 +1185,6 @@ static int open_fs_devices(struct btrfs_fs_devices *fs_devices,
{ {
struct btrfs_device *device; struct btrfs_device *device;
struct btrfs_device *latest_dev = NULL; struct btrfs_device *latest_dev = NULL;
int ret = 0;
flags |= FMODE_EXCL; flags |= FMODE_EXCL;
...@@ -1198,16 +1197,15 @@ static int open_fs_devices(struct btrfs_fs_devices *fs_devices, ...@@ -1198,16 +1197,15 @@ static int open_fs_devices(struct btrfs_fs_devices *fs_devices,
device->generation > latest_dev->generation) device->generation > latest_dev->generation)
latest_dev = device; latest_dev = device;
} }
if (fs_devices->open_devices == 0) { if (fs_devices->open_devices == 0)
ret = -EINVAL; return -EINVAL;
goto out;
}
fs_devices->opened = 1; fs_devices->opened = 1;
fs_devices->latest_bdev = latest_dev->bdev; fs_devices->latest_bdev = latest_dev->bdev;
fs_devices->total_rw_bytes = 0; fs_devices->total_rw_bytes = 0;
fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_REGULAR; fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_REGULAR;
out:
return ret; return 0;
} }
static int devid_cmp(void *priv, struct list_head *a, struct list_head *b) static int devid_cmp(void *priv, struct list_head *a, struct list_head *b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment