Fix krealloc() alignment

bcachefs assumes kmalloc & krealloc give out allocations that are
naturally aligned, like the kernel allocators do.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-04-08 15:48:45 -04:00
parent ce906d661e
commit d340c4f4a8

View File

@ -40,7 +40,7 @@ static inline void *krealloc(void *old, size_t size, gfp_t flags)
run_shrinkers(); run_shrinkers();
new = malloc(size); new = kmalloc(size, flags);
if (!new) if (!new)
return NULL; return NULL;