aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/balloon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r--drivers/xen/balloon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index a6d8e59e4531..f54290baa3db 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -114,7 +114,6 @@ static void __balloon_append(struct page *page)
114 if (PageHighMem(page)) { 114 if (PageHighMem(page)) {
115 list_add_tail(&page->lru, &ballooned_pages); 115 list_add_tail(&page->lru, &ballooned_pages);
116 balloon_stats.balloon_high++; 116 balloon_stats.balloon_high++;
117 dec_totalhigh_pages();
118 } else { 117 } else {
119 list_add(&page->lru, &ballooned_pages); 118 list_add(&page->lru, &ballooned_pages);
120 balloon_stats.balloon_low++; 119 balloon_stats.balloon_low++;
@@ -124,6 +123,8 @@ static void __balloon_append(struct page *page)
124static void balloon_append(struct page *page) 123static void balloon_append(struct page *page)
125{ 124{
126 __balloon_append(page); 125 __balloon_append(page);
126 if (PageHighMem(page))
127 dec_totalhigh_pages();
127 totalram_pages--; 128 totalram_pages--;
128} 129}
129 130
@@ -462,7 +463,7 @@ static int __init balloon_init(void)
462 pfn < extra_pfn_end; 463 pfn < extra_pfn_end;
463 pfn++) { 464 pfn++) {
464 page = pfn_to_page(pfn); 465 page = pfn_to_page(pfn);
465 /* totalram_pages doesn't include the boot-time 466 /* totalram_pages and totalhigh_pages do not include the boot-time
466 balloon extension, so don't subtract from it. */ 467 balloon extension, so don't subtract from it. */
467 __balloon_append(page); 468 __balloon_append(page);
468 } 469 }