Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38059ec2 authored by Steven Rostedt's avatar Steven Rostedt Committed by NeilBrown
Browse files

md: Fix userspace free_pages() macro



While using etags to find free_pages(), I stumbled across this debug
definition of free_pages() that is to be used while debugging some raid
code in userspace. The __get_free_pages() allocates the correct size,
but the free_pages() does not match. free_pages(), like
__get_free_pages(), takes an order and not a size.

Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 908f4fbd
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
						     PROT_READ|PROT_WRITE,   \
						     PROT_READ|PROT_WRITE,   \
						     MAP_PRIVATE|MAP_ANONYMOUS,\
						     MAP_PRIVATE|MAP_ANONYMOUS,\
						     0, 0))
						     0, 0))
# define free_pages(x, y)	munmap((void *)(x), (y)*PAGE_SIZE)
# define free_pages(x, y)	munmap((void *)(x), PAGE_SIZE << (y))


static inline void cpu_relax(void)
static inline void cpu_relax(void)
{
{