浏览代码

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>
Liu Bo 10 年之前
父节点
当前提交
8635eda91e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/btrfs/extent-tree.c

+ 1 - 0
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;
 			}