Skip to content

Commit 8635eda

Browse files
Liu Bomasoncl
authored andcommitted
Btrfs: add missing free_extent_buffer
read_tree_block may take a reference on the 'eb', a following free_extent_buffer is necessary. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
1 parent 0c30430 commit 8635eda

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/extent-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7981,6 +7981,7 @@ static int account_shared_subtree(struct btrfs_trans_handle *trans,
79817981
eb = read_tree_block(root, child_bytenr, child_gen);
79827982
if (!eb || !extent_buffer_uptodate(eb)) {
79837983
ret = -EIO;
7984+
free_extent_buffer(eb);
79847985
goto out;
79857986
}
79867987

0 commit comments

Comments
 (0)