Currently ALIGN_UP pushes segment boundaries one hugepage too far
which causes slice tests to fail when mapping read-only segments
of a binary in huge pages.

From: Mel Gorman <m...@csn.ul.ie>
Signed-off-by: Eric B Munson <ebmun...@us.ibm.com>
---
 libhugetlbfs_internal.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libhugetlbfs_internal.h b/libhugetlbfs_internal.h
index da32f84..905592b 100644
--- a/libhugetlbfs_internal.h
+++ b/libhugetlbfs_internal.h
@@ -45,7 +45,7 @@
 #define stringify(x)   stringify_1(x)
 
 #define ALIGN(x, a)    (((x) + (a) - 1) & ~((a) - 1))
-#define ALIGN_UP(x,a)  (((x) + (a)) & ~((a) - 1))
+#define ALIGN_UP(x,a)  (((x) + (a) - 1) & ~((a) - 1))
 #define ALIGN_DOWN(x,a) ((x) & ~((a) - 1))
 
 #if defined(__powerpc64__) || defined (__powerpc__)
-- 
1.6.3.3


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to