]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-correctly-update-zone-managed_pages-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 19 Jun 2013 00:06:20 +0000 (10:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:13:13 +0000 (17:13 +1000)
remove ifdef, per Wanpeng Li, virtio_balloon.c cleanup, per Sergei

Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: <sworddragon2@aol.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Michel Lespinasse <walken@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/virtio/virtio_balloon.c
mm/page_alloc.c

index ffd9e832f3391db324202a9559a4653807899cb0..1f572c00a1bec2f13e68861e6dda971e6fef5d40 100644 (file)
@@ -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);
        }
index 45ed6a35d25b8fc7ba3f8c69fcf0145c30a2e606..12722217efbf5b45e5ed67ebc1bf0adb43b35719 100644 (file)
@@ -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);
 }