Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] Btrfs: add missing free_extent_buffer
@ 2015-05-25  9:16 Liu Bo
  2015-05-25 12:31 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Bo @ 2015-05-25  9:16 UTC (permalink / raw)
  To: linux-btrfs

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>
---
 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 8b353ad..bb8a221 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -7649,6 +7649,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;
 			}
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-25 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25  9:16 [PATCH] Btrfs: add missing free_extent_buffer Liu Bo
2015-05-25 12:31 ` David Sterba
2015-05-25 12:33   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox