]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
debug-pagealloc-add-support-for-highmem-pages-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 28 Sep 2011 00:50:17 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 4 Oct 2011 07:38:35 +0000 (18:38 +1100)
remove unneeded preempt_disable/enable

Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <>
mm/debug-pagealloc.c

index bda7ed044eb1c436b363e8ca52206cc73d081d3d..7cea557407f40ef96351a91ade5fd3b9cbe915c0 100644 (file)
@@ -23,14 +23,11 @@ static inline bool page_poison(struct page *page)
 
 static void poison_page(struct page *page)
 {
-       void *addr;
+       void *addr = kmap_atomic(page);
 
-       preempt_disable();
-       addr = kmap_atomic(page);
        set_page_poison(page);
        memset(addr, PAGE_POISON, PAGE_SIZE);
        kunmap_atomic(addr);
-       preempt_enable();
 }
 
 static void poison_pages(struct page *page, int n)
@@ -82,12 +79,10 @@ static void unpoison_page(struct page *page)
        if (!page_poison(page))
                return;
 
-       preempt_disable();
        addr = kmap_atomic(page);
        check_poison_mem(addr, PAGE_SIZE);
        clear_page_poison(page);
        kunmap_atomic(addr);
-       preempt_enable();
 }
 
 static void unpoison_pages(struct page *page, int n)