diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-17 23:36:46 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:53 +0300 |
commit | 564fbd9dd6329abde8aca143da26ffbada13ff7d (patch) | |
tree | f1fd8e7668765da321f9fec4d125c6e43947bfd7 /fs | |
parent | 0cc1bc84d69138531d8a5e163caa57dfacd58cf2 (diff) | |
download | linux-564fbd9dd6329abde8aca143da26ffbada13ff7d.tar.xz |
bcachefs: Fix a 64 bit divide
This fixes a build failure on 32 bit
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/backpointers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index c269fc73a41d..e001f4191671 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -738,7 +738,7 @@ static size_t btree_nodes_fit_in_ram(struct bch_fs *c) si_meminfo(&i); mem_bytes = i.totalram * i.mem_unit; - return (mem_bytes >> 1) / btree_bytes(c); + return div_u64(mem_bytes >> 1, btree_bytes(c)); } int bch2_get_btree_in_memory_pos(struct btree_trans *trans, |