btrfs-progs: qgroups: fix misleading index check
commit66d90453cd4a619095338585a6b221f57a7b18d9
authorJeff Mahoney <jeffm@suse.com>
Wed, 16 May 2018 21:38:35 +0000 (16 17:38 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 12:58:31 +0000 (6 14:58 +0200)
tree9878ad1965bab30739bca47d8bb2fb3ca894cf0c
parent33d16ffc0d176ff4a217a0491378d20ad34e0a90
btrfs-progs: qgroups: fix misleading index check

In print_single_qgroup_table we check the loop index against
BTRFS_QGROUP_CHILD, but what we really mean is "last column."  Since
we have an enum value to indicate the last value, use that instead
of assuming that BTRFS_QGROUP_CHILD is always last.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
qgroup.c