]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - fs/btrfs/volumes.c
Merge tag 'pull-bd_inode-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[thirdparty/kernel/linux.git] / fs / btrfs / volumes.c
index 33d357e5f9c5c011fd8d970c10cdb3459b613245..c39145e8c4adcc7f40ecfe192fe27cae1f15f72b 100644 (file)
@@ -3458,6 +3458,7 @@ again:
                         * alignment and size).
                         */
                        ret = -EUCLEAN;
+                       mutex_unlock(&fs_info->reclaim_bgs_lock);
                        goto error;
                }
 
@@ -5617,21 +5618,6 @@ struct btrfs_chunk_map *btrfs_alloc_chunk_map(int num_stripes, gfp_t gfp)
        return map;
 }
 
-struct btrfs_chunk_map *btrfs_clone_chunk_map(struct btrfs_chunk_map *map, gfp_t gfp)
-{
-       const int size = btrfs_chunk_map_size(map->num_stripes);
-       struct btrfs_chunk_map *clone;
-
-       clone = kmemdup(map, size, gfp);
-       if (!clone)
-               return NULL;
-
-       refcount_set(&clone->refs, 1);
-       RB_CLEAR_NODE(&clone->rb_node);
-
-       return clone;
-}
-
 static struct btrfs_block_group *create_chunk(struct btrfs_trans_handle *trans,
                        struct alloc_chunk_ctl *ctl,
                        struct btrfs_device_info *devices_info)