From 0da591ddf28b0b5f3fc16b82c6e72c3c433068ed Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Mon, 5 Jan 2015 15:56:15 +0800 Subject: btrfs-progs: Fix a extent buffer leak in count_csum_range(). 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 Reviewed-by: Satoru Takeuchi Signed-off-by: David Sterba --- cmds-check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-check.c b/cmds-check.c index dabe87a5..e3c5d546 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; } -- cgit v1.2.3