VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Filipe Manana <fdmanana@suse.com> 2023-06-08 11:27:38 +0100 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:36:57 +0200 commit: 796eb12aa5e4bc3bd217e6fff0d37f7bf6f6a8ea parent: 6df630a1e382abc34acdf71758ef11100fa5ade4
Commit Summary:
btrfs: fix extent buffer leak after tree mod log failure at split_node()
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 5e1763cf6b48..05717580dfbf 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -2982,6 +2982,8 @@ static noinline int split_node(struct btrfs_trans_handle *trans,
 
 	ret = btrfs_tree_mod_log_eb_copy(split, c, 0, mid, c_nritems - mid);
 	if (ret) {
+		btrfs_tree_unlock(split);
+		free_extent_buffer(split);
 		btrfs_abort_transaction(trans, ret);
 		return ret;
 	}