mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue