Files
linux/fs/btrfs
Filipe Manana 487e6e62cc btrfs: fix extent map leak in unexpected scenario at unpin_extent_cache()
[ Upstream commit 8a565ec04d ]

At unpin_extent_cache() if we happen to find an extent map with an
unexpected start offset, we jump to the 'out' label and never release the
reference we added to the extent map through the call to
lookup_extent_mapping(), therefore resulting in a leak. So fix this by
moving the free_extent_map() under the 'out' label.

Fixes: c03c89f821 ("btrfs: handle errors returned from unpin_extent_cache()")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:32:44 +02:00
..
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:27 +01:00
2023-08-24 16:20:18 -07:00
2023-12-15 20:27:04 +01:00
2023-12-15 23:00:04 +01:00