aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-04-05 13:56:44 -0700
committerTodd Poynor <toddpoynor@google.com>2013-04-05 13:56:44 -0700
commit12b868488bc5abfb5fc0910aa34b32d6209073df (patch)
tree5d37b78d71a0070a73fa8bcead7dce040119f554 /mm/hugetlb.c
parent0bb6ee4f4587d219cfbb328e8a14f608405b52b9 (diff)
parentae7859181482fcfe38d9352bd0932fa45456bdd0 (diff)
downloadkernel_samsung_tuna-12b868488bc5abfb5fc0910aa34b32d6209073df.zip
kernel_samsung_tuna-12b868488bc5abfb5fc0910aa34b32d6209073df.tar.gz
kernel_samsung_tuna-12b868488bc5abfb5fc0910aa34b32d6209073df.tar.bz2
Merge tag 'v3.0.72' into android-3.0
This is the 3.0.72 stable release
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 037f077..2c56a53 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2006,8 +2006,12 @@ int hugetlb_report_node_meminfo(int nid, char *buf)
/* Return the number pages of memory we physically have, in PAGE_SIZE units. */
unsigned long hugetlb_total_pages(void)
{
- struct hstate *h = &default_hstate;
- return h->nr_huge_pages * pages_per_huge_page(h);
+ struct hstate *h;
+ unsigned long nr_total_pages = 0;
+
+ for_each_hstate(h)
+ nr_total_pages += h->nr_huge_pages * pages_per_huge_page(h);
+ return nr_total_pages;
}
static int hugetlb_acct_memory(struct hstate *h, long delta)