diff --git a/qgroup-verify.c b/qgroup-verify.c index 1a0d38c3..86dcd6df 100644 --- a/qgroup-verify.c +++ b/qgroup-verify.c @@ -711,8 +711,13 @@ static void read_qgroup_status(struct btrfs_path *path, status_item = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_qgroup_status_item); flags = btrfs_qgroup_status_flags(path->nodes[0], status_item); - counts->qgroup_inconsist = flags & BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; - counts->rescan_running = flags & BTRFS_QGROUP_STATUS_FLAG_RESCAN; + /* + * Since qgroup_inconsist/rescan_running is just one bit, + * assign value directly won't work. + */ + counts->qgroup_inconsist = !!(flags & + BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT); + counts->rescan_running = !!(flags & BTRFS_QGROUP_STATUS_FLAG_RESCAN); } static int load_quota_info(struct btrfs_fs_info *info)