Btrfs: add missing free_extent_buffer
authorLiu Bo <[email protected]>
Mon, 25 May 2015 09:30:14 +0000 (17:30 +0800)
committerChris Mason <[email protected]>
Wed, 3 Jun 2015 11:03:07 +0000 (04:03 -0700)
read_tree_block may take a reference on the 'eb', a following
free_extent_buffer is necessary.

Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/extent-tree.c

index e78ab29f8f1b23b9943a9e83a2395aee0382aa3e..076fd7484a8208c7bc0ac8f7da8cb4b477387ccb 100644 (file)
@@ -7981,6 +7981,7 @@ walk_down:
                        eb = read_tree_block(root, child_bytenr, child_gen);
                        if (!eb || !extent_buffer_uptodate(eb)) {
                                ret = -EIO;
+                               free_extent_buffer(eb);
                                goto out;
                        }