Skip to content

Commit

Permalink
md: Fix userspace free_pages() macro
Browse files Browse the repository at this point in the history
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: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
Steven Rostedt authored and NeilBrown committed Dec 22, 2011
1 parent 908f4fb commit 38059ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/raid/pq.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
PROT_READ|PROT_WRITE, \
MAP_PRIVATE|MAP_ANONYMOUS,\
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)
{
Expand Down

0 comments on commit 38059ec

Please sign in to comment.