Skip to content

Commit

Permalink
Btrfs: Only open block devices once during mount -o subvol=
Browse files Browse the repository at this point in the history
btrfs_open_devices needed a check to see if the device was already
open.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent a68d593 commit c1c4d91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
mutex_lock(&uuid_mutex);
list_for_each(cur, head) {
device = list_entry(cur, struct btrfs_device, dev_list);
if (device->bdev)
continue;

bdev = open_bdev_excl(device->name, flags, holder);

if (IS_ERR(bdev)) {
Expand Down

0 comments on commit c1c4d91

Please sign in to comment.