]> 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, 5 Oct 2011 00:43:04 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Oct 2011 06:06:40 +0000 (17:06 +1100)
remove unneeded preempt_disable/enable

Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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)