Btrfs: add missing free_extent_buffer
authorLiu Bo <bo.li.liu@oracle.com>
Mon, 25 May 2015 09:30:14 +0000 (17:30 +0800)
committerChris Mason <clm@fb.com>
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 <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
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;
                        }