2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/fs/btrfs/tests
Filipe Manana 009ca35848 btrfs: tests: fix chunk map leak after failure to add it to the tree
If we fail to add the chunk map to the fs mapping tree we exit
test_rmap_block() without freeing the chunk map. Fix this by adding a
call to btrfs_free_chunk_map() before exiting the test function if the
call to btrfs_add_chunk_map() failed.

Fixes: 7dc66abb5a ("btrfs: use a dedicated data structure for chunk maps")
CC: stable@vger.kernel.org # 6.12+
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2025-03-18 20:35:51 +01:00
..
btrfs-tests.c btrfs: selftests: add delayed ref self test cases 2025-01-13 14:53:13 +01:00
btrfs-tests.h btrfs: selftests: add delayed ref self test cases 2025-01-13 14:53:13 +01:00
delayed-refs-tests.c btrfs: selftests: fix btrfs_test_delayed_refs() leak of transaction 2025-02-17 17:24:14 +01:00
extent-buffer-tests.c btrfs: abort transaction on generation mismatch when marking eb as dirty 2023-10-12 16:44:07 +02:00
extent-io-tests.c btrfs: merge alloc_dummy_extent_buffer() helpers 2025-03-18 20:35:47 +01:00
extent-map-tests.c btrfs: tests: fix chunk map leak after failure to add it to the tree 2025-03-18 20:35:51 +01:00
free-space-tests.c btrfs: remove use btrfs_remove_free_space_cache instead of variant 2022-09-26 12:27:58 +02:00
free-space-tree-tests.c btrfs: convert btrfs_block_group::needs_free_space to runtime flag 2022-12-05 18:00:51 +01:00
inode-tests.c btrfs: remove extent_map::block_start member 2024-07-11 15:33:21 +02:00
qgroup-tests.c btrfs: use a structure to pass arguments to backref walking functions 2022-12-05 18:00:50 +01:00
raid-stripe-tree-tests.c btrfs: selftests: add a selftest for deleting two out of three extents 2025-01-14 15:57:55 +01:00