From 8635eda91ee11690bd8f73b2504ee19431fd6380 Mon Sep 17 00:00:00 2001 From: Liu Bo Date: Mon, 25 May 2015 17:30:14 +0800 Subject: 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 Reviewed-by: David Sterba Signed-off-by: Chris Mason --- fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3