Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: fix transaction handle leaks in btrfs_last_identity_remap_gone()

btrfs_abort_transaction(), unlike btrfs_commit_transaction(), doesn't
also free the transaction handle. Fix the instances in
btrfs_last_identity_remap_gone() where we're also leaking the
transaction on abort.

Reported-by: Chris Mason <clm@fb.com>
Link: https://lore.kernel.org/linux-btrfs/20260125125129.2245240-1-clm@meta.com/
Fixes: 979e1dc3d69e ("btrfs: handle deletions from remapped block group")
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Mark Harmstone and committed by
David Sterba
7885ca40 54b9395b

+3
+3
fs/btrfs/relocation.c
··· 4723 4723 ret = btrfs_remove_dev_extents(trans, chunk_map); 4724 4724 if (unlikely(ret)) { 4725 4725 btrfs_abort_transaction(trans, ret); 4726 + btrfs_end_transaction(trans); 4726 4727 return ret; 4727 4728 } 4728 4729 ··· 4733 4732 if (unlikely(ret)) { 4734 4733 mutex_unlock(&trans->fs_info->chunk_mutex); 4735 4734 btrfs_abort_transaction(trans, ret); 4735 + btrfs_end_transaction(trans); 4736 4736 return ret; 4737 4737 } 4738 4738 } ··· 4752 4750 ret = remove_chunk_stripes(trans, chunk_map, path); 4753 4751 if (unlikely(ret)) { 4754 4752 btrfs_abort_transaction(trans, ret); 4753 + btrfs_end_transaction(trans); 4755 4754 return ret; 4756 4755 } 4757 4756