Home
last modified time | relevance | path

Searched hist:"72 c9925f87c8b74f36f8e75a4cd93d964538d3ca" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/btrfs/
H A Dctree.cdiff 72c9925f87c8b74f36f8e75a4cd93d964538d3ca Thu Feb 04 08:35:44 CST 2021 Filipe Manana <fdmanana@suse.com> btrfs: fix extent buffer leak on failure to copy root

At btrfs_copy_root(), if the call to btrfs_inc_ref() fails we end up
returning without unlocking and releasing our reference on the extent
buffer named "cow" we previously allocated with btrfs_alloc_tree_block().

So fix that by unlocking the extent buffer and dropping our reference on
it before returning.

Fixes: be20aa9dbadc8c ("Btrfs: Add mount option to turn off data cow")
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>