X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=smalloc.c;h=e48cfe8b1c11339d8e566743472795606668d588;hb=deb728c66d3f745abca5afc4eebcf0d5049d50fd;hp=d038ac64ccfb8dedbe2801ed3630dafbb121b97c;hpb=81b3c86f086cb2340d1c5596202a307487216b21;p=fio.git diff --git a/smalloc.c b/smalloc.c index d038ac64..e48cfe8b 100644 --- a/smalloc.c +++ b/smalloc.c @@ -13,6 +13,7 @@ #include #include +#include "fio.h" #include "mutex.h" #include "arch/arch.h" #include "os/os.h" @@ -248,7 +249,7 @@ static void *postred_ptr(struct block_hdr *hdr) uintptr_t ptr; ptr = (uintptr_t) hdr + hdr->size - sizeof(unsigned int); - ptr = (ptr + int_mask) & ~int_mask; + ptr = (uintptr_t) PTR_ALIGN(ptr, int_mask); return (void *) ptr; }