mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Fix build on 32 bit
size_t is apparently not an unsigned long on 32 bit, which is what rounddown_pow_of_two() returns. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
d6d1d8e519
commit
29e27cc492
@ -27,7 +27,8 @@ static inline void *kmalloc_noprof(size_t size, gfp_t flags)
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (size) {
|
||||
size_t alignment = min(rounddown_pow_of_two(size), (size_t)PAGE_SIZE);
|
||||
size_t alignment = min_t(size_t, PAGE_SIZE,
|
||||
rounddown_pow_of_two(size));
|
||||
alignment = max(sizeof(void *), alignment);
|
||||
if (posix_memalign(&p, alignment, size))
|
||||
p = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user