Commit 564fbd9d authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix a 64 bit divide

This fixes a build failure on 32 bit
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 0cc1bc84
......@@ -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,
......
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