btrfs-progs: Fix a extent buffer leak in count_csum_range().

The commit f495a2ac66 ("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>
Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
Qu Wenruo 2015-01-05 15:56:15 +08:00 committed by David Sterba
parent 73cc83d08e
commit 0da591ddf2
1 changed files with 1 additions and 1 deletions

View File

@ -1186,9 +1186,9 @@ static int count_csum_range(struct btrfs_root *root, u64 start,
path.slots[0]++; path.slots[0]++;
} }
out: out:
btrfs_release_path(&path);
if (ret < 0) if (ret < 0)
return ret; return ret;
btrfs_release_path(&path);
return 0; return 0;
} }