[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1323869678.23971.19.camel@gandalf.stny.rr.com>
Date: Wed, 14 Dec 2011 08:34:38 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: NeilBrown <neilb@...e.de>, Dan Williams <dan.j.williams@...el.com>,
"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: 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.
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
index 2b59cc8..53272e9 100644
--- a/include/linux/raid/pq.h
+++ b/include/linux/raid/pq.h
@@ -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)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists