diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-05-08 15:05:58 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:02 -0400 |
commit | c1c4d91c38e6e5b29543b02d4a4fb7f007e44f70 (patch) | |
tree | 09f42fd06864114dc5ab6676c4ed6aee9e9e024e /fs | |
parent | a68d5933a0e409592860229b35230c8e87155472 (diff) |
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: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 55da5f0c56e3..aa001b08ced0 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -196,6 +196,9 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, | |||
196 | mutex_lock(&uuid_mutex); | 196 | mutex_lock(&uuid_mutex); |
197 | list_for_each(cur, head) { | 197 | list_for_each(cur, head) { |
198 | device = list_entry(cur, struct btrfs_device, dev_list); | 198 | device = list_entry(cur, struct btrfs_device, dev_list); |
199 | if (device->bdev) | ||
200 | continue; | ||
201 | |||
199 | bdev = open_bdev_excl(device->name, flags, holder); | 202 | bdev = open_bdev_excl(device->name, flags, holder); |
200 | 203 | ||
201 | if (IS_ERR(bdev)) { | 204 | if (IS_ERR(bdev)) { |