Skip to content

Commit

Permalink
Btrfs: add missing free_extent_buffer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Bo authored and Chris Mason committed Jun 3, 2015
1 parent 0c30430 commit 8635eda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -7981,6 +7981,7 @@ static int account_shared_subtree(struct btrfs_trans_handle *trans,
eb = read_tree_block(root, child_bytenr, child_gen);
if (!eb || !extent_buffer_uptodate(eb)) {
ret = -EIO;
free_extent_buffer(eb);
goto out;
}

Expand Down

0 comments on commit 8635eda

Please sign in to comment.