diff options
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 1779338e1d86..a767884a6c7a 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -94,8 +94,8 @@ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; | |||
94 | #define inc_totalhigh_pages() (totalhigh_pages++) | 94 | #define inc_totalhigh_pages() (totalhigh_pages++) |
95 | #define dec_totalhigh_pages() (totalhigh_pages--) | 95 | #define dec_totalhigh_pages() (totalhigh_pages--) |
96 | #else | 96 | #else |
97 | #define inc_totalhigh_pages() do {} while(0) | 97 | #define inc_totalhigh_pages() do {} while (0) |
98 | #define dec_totalhigh_pages() do {} while(0) | 98 | #define dec_totalhigh_pages() do {} while (0) |
99 | #endif | 99 | #endif |
100 | 100 | ||
101 | /* List of ballooned pages, threaded through the mem_map array. */ | 101 | /* List of ballooned pages, threaded through the mem_map array. */ |
@@ -155,8 +155,7 @@ static struct page *balloon_retrieve(bool prefer_highmem) | |||
155 | if (PageHighMem(page)) { | 155 | if (PageHighMem(page)) { |
156 | balloon_stats.balloon_high--; | 156 | balloon_stats.balloon_high--; |
157 | inc_totalhigh_pages(); | 157 | inc_totalhigh_pages(); |
158 | } | 158 | } else |
159 | else | ||
160 | balloon_stats.balloon_low--; | 159 | balloon_stats.balloon_low--; |
161 | 160 | ||
162 | totalram_pages++; | 161 | totalram_pages++; |
@@ -423,7 +422,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) | |||
423 | (unsigned long)__va(pfn << PAGE_SHIFT), | 422 | (unsigned long)__va(pfn << PAGE_SHIFT), |
424 | __pte_ma(0), 0); | 423 | __pte_ma(0), 0); |
425 | BUG_ON(ret); | 424 | BUG_ON(ret); |
426 | } | 425 | } |
427 | 426 | ||
428 | } | 427 | } |
429 | 428 | ||
@@ -508,7 +507,7 @@ EXPORT_SYMBOL_GPL(balloon_set_new_target); | |||
508 | int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) | 507 | int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) |
509 | { | 508 | { |
510 | int pgno = 0; | 509 | int pgno = 0; |
511 | struct page* page; | 510 | struct page *page; |
512 | mutex_lock(&balloon_mutex); | 511 | mutex_lock(&balloon_mutex); |
513 | while (pgno < nr_pages) { | 512 | while (pgno < nr_pages) { |
514 | page = balloon_retrieve(highmem); | 513 | page = balloon_retrieve(highmem); |
@@ -541,7 +540,7 @@ EXPORT_SYMBOL(alloc_xenballooned_pages); | |||
541 | * @nr_pages: Number of pages | 540 | * @nr_pages: Number of pages |
542 | * @pages: pages to return | 541 | * @pages: pages to return |
543 | */ | 542 | */ |
544 | void free_xenballooned_pages(int nr_pages, struct page** pages) | 543 | void free_xenballooned_pages(int nr_pages, struct page **pages) |
545 | { | 544 | { |
546 | int i; | 545 | int i; |
547 | 546 | ||