diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-11-12 20:25:30 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-11-23 19:52:04 +0100 |
| commit | ee020b5f0eb81a86533a16dcaafcee2b97a0f74d (patch) | |
| tree | 206a2aeb7c8ec54fd95809d21f35a7b3d790b5ba /tools/perf/scripts/python/task-analyzer.py | |
| parent | eb11039d8a3cab58c658ff4b8b14aa4b00961e46 (diff) | |
btrfs: fix double release of space when cloning compressed inline extent
In copy_inline_to_page(), if we fail to decompress the inline extent, we
jump to the out_unlock label and release the reserved data and metadata
space with a call to btrfs_delalloc_release_space(). However we leave the
range in the inode's io_tree marked as delalloc, which was set by
btrfs_reset_extent_delalloc(), and that means when someone later clears
the delalloc range, using EXTENT_DO_ACCOUNTING (like
btrfs_reset_extent_delalloc() does), it will release again the space.
This does not happen for uncompressed inline extents, because after the
call to btrfs_reset_extent_delalloc() we can't get any other errors.
Link: https://sashiko.dev/#/bug/linux-52478dd4-bd10-48de-baba-a527b38b64aa
Fixes: 05a5a7621ce6 ("Btrfs: implement full reflink support for inline extents")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
