]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
btrfs: remove alloc_list splice in btrfs_prepare_sprout
authorNikolay Borisov <nborisov@suse.com>
Wed, 12 Aug 2020 13:26:46 +0000 (16:26 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:06:59 +0000 (12:06 +0200)
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>
fs/btrfs/volumes.c

index 7a39f3aebc537d583c017874d1181e48dfe80752..9800e966ef6e5b9fe752eb3fff10a297448e94bb 100644 (file)
@@ -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;