Skip to content

Commit 2ab2244

Browse files
boryaskdave
authored andcommitted
btrfs: fix referenced/exclusive check in squota_check_parent_usage()
We compared rfer_cmpr against excl_cmpr_sum instead of rfer_cmpr_sum which is confusing. I expect that rfer_cmpr == excl_cmpr in squota, but it is much better to be consistent in case of any surprises or bugs. Reported-by: Chris Mason <clm@meta.com> Link: https://lore.kernel.org/linux-btrfs/cover.1764796022.git.boris@bur.io/T/#mccb231643ffd290b44a010d4419474d280be5537 Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Boris Burkov <boris@bur.io> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 8ac7fad commit 2ab2244

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/qgroup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static bool squota_check_parent_usage(struct btrfs_fs_info *fs_info, struct btrf
370370
nr_members++;
371371
}
372372
mismatch = (parent->excl != excl_sum || parent->rfer != rfer_sum ||
373-
parent->excl_cmpr != excl_cmpr_sum || parent->rfer_cmpr != excl_cmpr_sum);
373+
parent->excl_cmpr != excl_cmpr_sum || parent->rfer_cmpr != rfer_cmpr_sum);
374374

375375
WARN(mismatch,
376376
"parent squota qgroup %hu/%llu has mismatched usage from its %d members. "

0 commit comments

Comments
 (0)