Commit 101d4713 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix a 64 bit divide

this fixes builds on 32 bit.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 35ef6df5
......@@ -321,7 +321,7 @@ static u64 reserve_factor(u64 r)
static u64 avail_factor(u64 r)
{
return (r << RESERVE_FACTOR) / ((1 << RESERVE_FACTOR) + 1);
return div_u64(r << RESERVE_FACTOR, (1 << RESERVE_FACTOR) + 1);
}
u64 bch2_fs_sectors_used(struct bch_fs *c, struct bch_fs_usage_online *fs_usage)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment