From 99c876f21e6d7d2512eb4aa6b20601524a5d9f9d Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 19 Jun 2013 10:06:20 +1000 Subject: [PATCH] mm-correctly-update-zone-managed_pages-fix remove ifdef, per Wanpeng Li, virtio_balloon.c cleanup, per Sergei Cc: "H. Peter Anvin" Cc: "Michael S. Tsirkin" Cc: Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Chris Metcalf Cc: David Howells Cc: Geert Uytterhoeven Cc: Ingo Molnar Cc: Jeremy Fitzhardinge Cc: Jiang Liu Cc: Jiang Liu Cc: Jianguo Wu Cc: Joonsoo Kim Cc: Kamezawa Hiroyuki Cc: Konrad Rzeszutek Wilk Cc: Marek Szyprowski Cc: Mel Gorman Cc: Michel Lespinasse Cc: Minchan Kim Cc: Rik van Riel Cc: Russell King Cc: Rusty Russell Cc: Tang Chen Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wen Congyang Cc: Will Deacon Cc: Yasuaki Ishimatsu Cc: Yinghai Lu Cc: Sergei Shtylyov Signed-off-by: Andrew Morton --- drivers/virtio/virtio_balloon.c | 3 +-- mm/page_alloc.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index ffd9e832f339..1f572c00a1be 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -160,11 +160,10 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num) static void release_pages_by_pfn(const u32 pfns[], unsigned int num) { unsigned int i; - struct page *page; /* Find pfns pointing at start of each page, get pages and free them. */ for (i = 0; i < num; i += VIRTIO_BALLOON_PAGES_PER_PAGE) { - page = balloon_pfn_to_page(pfns[i]); + struct page *page = balloon_pfn_to_page(pfns[i]); balloon_page_free(page); adjust_managed_page_count(page, 1); } diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 45ed6a35d25b..12722217efbf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5203,10 +5203,8 @@ void adjust_managed_page_count(struct page *page, long count) spin_lock(&managed_page_count_lock); page_zone(page)->managed_pages += count; totalram_pages += count; -#ifdef CONFIG_HIGHMEM if (PageHighMem(page)) totalhigh_pages += count; -#endif spin_unlock(&managed_page_count_lock); } -- 2.39.5