diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-23 11:46:34 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:25 -0400 |
commit | 82697a10dd4b9a6f7c6f98a525778d032db2f2fb (patch) | |
tree | 3c170b18bbfc5cdcdcb5253ac390a0c0ee1eecca /fs/bcachefs/quota.c | |
parent | 78a8f36280e178df4e78382c82a20e3af1704e65 (diff) | |
download | lwn-82697a10dd4b9a6f7c6f98a525778d032db2f2fb.tar.gz lwn-82697a10dd4b9a6f7c6f98a525778d032db2f2fb.zip |
bcachefs: Fix 32 bit build
vstruct_bytes() was returning a u64 - it should be a size_t, the corect
type for the size of anything that fits in memory.
Also replace a 64 bit divide with div_u64().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/quota.c')
-rw-r--r-- | fs/bcachefs/quota.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/quota.c b/fs/bcachefs/quota.c index b7ef8fa7bbc9..ca029a00e7b8 100644 --- a/fs/bcachefs/quota.c +++ b/fs/bcachefs/quota.c @@ -23,7 +23,7 @@ static int bch2_sb_quota_validate(struct bch_sb *sb, struct bch_sb_field *f, struct bch_sb_field_quota *q = field_to_type(f, quota); if (vstruct_bytes(&q->field) < sizeof(*q)) { - pr_buf(err, "wrong size (got %llu should be %zu)", + pr_buf(err, "wrong size (got %zu should be %zu)", vstruct_bytes(&q->field), sizeof(*q)); return -EINVAL; } |