linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Fix a extent buffer leak in count_csum_range().
@ 2015-01-05  7:56 Qu Wenruo
  2015-01-05  8:20 ` Satoru Takeuchi
  0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2015-01-05  7:56 UTC (permalink / raw)
  To: linux-btrfs

The commit f495a2ac6611 ("btrfs-progs: fsck: remove unfriendly BUG_ON()
for searching tree failure") is causing tons of extent buffer leak if some
csum mismatches in btrfsck.

This is caused by a misplaced btrfs_release_path(), fix it.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 cmds-check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-check.c b/cmds-check.c
index d2d218a..5b644cf 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -1186,9 +1186,9 @@ static int count_csum_range(struct btrfs_root *root, u64 start,
 		path.slots[0]++;
 	}
 out:
+	btrfs_release_path(&path);
 	if (ret < 0)
 		return ret;
-	btrfs_release_path(&path);
 	return 0;
 }
 
-- 
2.2.1


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

end of thread, other threads:[~2015-01-05  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05  7:56 [PATCH] btrfs-progs: Fix a extent buffer leak in count_csum_range() Qu Wenruo
2015-01-05  8:20 ` Satoru Takeuchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).