mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-19 01:49:47 -05:00
bcachefs: Fix a 64 bit divide
This fixes a build failure on 32 bit Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user