diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-08-12 16:26:46 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:06:59 +0200 |
commit | 68abf360160ca085bb5109d35692ea0f9581f8d1 (patch) | |
tree | 9441a6945ab98e258e2fcda9135786950744c0f2 /fs/btrfs/volumes.c | |
parent | 427c8fddb1296dd013d8af5a4957d9d88fb8ab4e (diff) | |
download | lwn-68abf360160ca085bb5109d35692ea0f9581f8d1.tar.gz lwn-68abf360160ca085bb5109d35692ea0f9581f8d1.zip |
btrfs: remove alloc_list splice in btrfs_prepare_sprout
btrfs_prepare_sprout is called when the first rw device is added to a
seed filesystem. This means the filesystem can't have its alloc_list
be non-empty, since seed filesystems are read only. Simply remove the
code altogether.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 7a39f3aebc53..9800e966ef6e 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2391,10 +2391,6 @@ static int btrfs_prepare_sprout(struct btrfs_fs_info *fs_info) list_for_each_entry(device, &seed_devices->devices, dev_list) device->fs_devices = seed_devices; - mutex_lock(&fs_info->chunk_mutex); - list_splice_init(&fs_devices->alloc_list, &seed_devices->alloc_list); - mutex_unlock(&fs_info->chunk_mutex); - fs_devices->seeding = false; fs_devices->num_devices = 0; fs_devices->open_devices = 0; |