btrfs-progs: qgroup: Fix regression leads to corrupted qgroup status
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 7 Sep 2016 02:54:19 +0000 (10:54 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Oct 2016 13:07:23 +0000 (15:07 +0200)
commit7c646c538e74ab7fc0eece14983e85031d1031d4
tree1f12c229199ca7f5fc793673eb9032063bc5f32c
parent85d608f7ecec2317456059199644e9f940a38e5c
btrfs-progs: qgroup: Fix regression leads to corrupted qgroup status

Commit 93dabf211d74daf6e3de642bdd887a90a00f7b49
Author: Mark Fasheh <mfasheh@suse.de>
Date:   Fri Jun 17 13:37:48 2016 -0700

    btrfs-progs: check: verify qgroups above level 0

This commit introduced a new regression which corrupts
read_qgroup_status, since it iterate leaf with manually specified slot,
not correct path->slot[0].

This leads to wrong slot[0] and read_qgroup_status() will read out wrong
flags, leading to regression.

Fix read_qgroup_status() by using eb and slot instread of wrong path
strucutre.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
qgroup-verify.c