Message ID | 1432546215-10954-1-git-send-email-bo.li.liu@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Mon, May 25, 2015 at 05:30:14PM +0800, Liu Bo wrote: > 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> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0ec3acd..a129254 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -7922,6 +7922,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; }
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> --- This is based on the latest for-linus-4.1. fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+)