summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2015-05-25 11:30:14 +0200
committerChris Mason <clm@fb.com>2015-06-03 13:03:07 +0200
commit8635eda91ee11690bd8f73b2504ee19431fd6380 (patch)
tree61e5f3e1a0dd762007e632cd79360a66ea7b6533
parentBtrfs: remove csum_bytes_left (diff)
downloadlinux-8635eda91ee11690bd8f73b2504ee19431fd6380.tar.xz
linux-8635eda91ee11690bd8f73b2504ee19431fd6380.zip
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>
-rw-r--r--fs/btrfs/extent-tree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index e78ab29f8f1b..076fd7484a82 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -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;
}