bcachefs: Fix a 64 bit divide
this fixes builds on 32 bit. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
35ef6df5ca
commit
101d471367
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user