summaryrefslogtreecommitdiff
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>2014-05-22 10:42:38 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-05-22 10:42:38 +1000
commita43bdcf5a437f74bd4db3322adfb1ad18aca31b3 (patch)
tree0dd4b074268182ca5a371a8bb8318195c942a44e /mm/hugetlb.c
parent5f27701bc5241cbd250031f4841edfd4b6170411 (diff)
mm-hugetlbfs-fix-rmapping-for-anonymous-hugepages-with-page_pgoff-v2
- fix wrong shift direction - introduce page_size_order() and huge_page_size_order() - move the declaration of PageHuge() to include/linux/hugetlb_inline.h to avoid macro definition. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index eedb6e4ef51..6b1f77b635c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -31,6 +31,7 @@
#include <linux/io.h>
#include <linux/hugetlb.h>
+#include <linux/hugetlb_inline.h>
#include <linux/hugetlb_cgroup.h>
#include <linux/node.h>
#include "internal.h"
@@ -765,9 +766,9 @@ pgoff_t __basepage_index(struct page *page)
return (index << compound_order(page_head)) + compound_idx;
}
-pgoff_t hugepage_pgoff(struct page *page)
+unsigned int huge_page_size_order(struct page *page)
{
- return page->index << huge_page_order(page_hstate(page));
+ return huge_page_order(page_hstate(page));
}
static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid)