return &fs_uuids;
 }
 
-static struct btrfs_fs_devices *__alloc_fs_devices(void)
+/*
+ * alloc_fs_devices - allocate struct btrfs_fs_devices
+ * @fsid:      if not NULL, copy the uuid to fs_devices::fsid
+ *
+ * Return a pointer to a new struct btrfs_fs_devices on success, or ERR_PTR().
+ * The returned struct is not linked onto any lists and can be destroyed with
+ * kfree() right away.
+ */
+static struct btrfs_fs_devices *alloc_fs_devices(const u8 *fsid)
 {
        struct btrfs_fs_devices *fs_devs;
 
        INIT_LIST_HEAD(&fs_devs->resized_devices);
        INIT_LIST_HEAD(&fs_devs->alloc_list);
        INIT_LIST_HEAD(&fs_devs->list);
-
-       return fs_devs;
-}
-
-/**
- * alloc_fs_devices - allocate struct btrfs_fs_devices
- * @fsid:      a pointer to UUID for this FS.  If NULL a new UUID is
- *             generated.
- *
- * Return: a pointer to a new &struct btrfs_fs_devices on success;
- * ERR_PTR() on error.  Returned struct is not linked onto any lists and
- * can be destroyed with kfree() right away.
- */
-static struct btrfs_fs_devices *alloc_fs_devices(const u8 *fsid)
-{
-       struct btrfs_fs_devices *fs_devs;
-
-       fs_devs = __alloc_fs_devices();
-       if (IS_ERR(fs_devs))
-               return fs_devs;
-
        if (fsid)
                memcpy(fs_devs->fsid, fsid, BTRFS_FSID_SIZE);
-       else
-               generate_random_uuid(fs_devs->fsid);
 
        return fs_devs;
 }
        if (!fs_devices->seeding)
                return -EINVAL;
 
-       seed_devices = __alloc_fs_devices();
+       seed_devices = alloc_fs_devices(NULL);
        if (IS_ERR(seed_devices))
                return PTR_ERR(seed_devices);
 
        int ret;
 
        BUG_ON(!mutex_is_locked(&uuid_mutex));
+       ASSERT(fsid);
 
        fs_devices = fs_info->fs_devices->seed;
        while (fs_devices) {