Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 1/2 RESEND] Btrfs: add missing free_extent_buffer
@ 2015-05-25  9:30 Liu Bo
  2015-05-25  9:30 ` [PATCH 2/2] [PATCH 2/2] Btrfs: fix up read_tree_block to return proper error Liu Bo
  2015-05-26 16:34 ` [PATCH 1/2 RESEND] Btrfs: add missing free_extent_buffer David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Liu Bo @ 2015-05-25  9:30 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>
---
This is based on the latest for-linus-4.1.

 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 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;
 			}
 
-- 
2.1.0


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

end of thread, other threads:[~2015-05-26 16:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25  9:30 [PATCH 1/2 RESEND] Btrfs: add missing free_extent_buffer Liu Bo
2015-05-25  9:30 ` [PATCH 2/2] [PATCH 2/2] Btrfs: fix up read_tree_block to return proper error Liu Bo
2015-05-26 16:34   ` David Sterba
2015-05-26 16:34 ` [PATCH 1/2 RESEND] Btrfs: add missing free_extent_buffer David Sterba

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