Commit c1c4d91c authored by Chris Mason's avatar Chris Mason

Btrfs: Only open block devices once during mount -o subvol=

btrfs_open_devices needed a check to see if the device was already
open.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent a68d5933
...@@ -196,6 +196,9 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, ...@@ -196,6 +196,9 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
mutex_lock(&uuid_mutex); mutex_lock(&uuid_mutex);
list_for_each(cur, head) { list_for_each(cur, head) {
device = list_entry(cur, struct btrfs_device, dev_list); device = list_entry(cur, struct btrfs_device, dev_list);
if (device->bdev)
continue;
bdev = open_bdev_excl(device->name, flags, holder); bdev = open_bdev_excl(device->name, flags, holder);
if (IS_ERR(bdev)) { if (IS_ERR(bdev)) {
......
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