From: Andrew Morton Date: Wed, 28 Sep 2011 00:50:17 +0000 (+1000) Subject: debug-pagealloc-add-support-for-highmem-pages-fix X-Git-Tag: next-20110930~1^2~154 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f6dbca564fa7f2363401067ece1a8c784579b627;p=karo-tx-linux.git debug-pagealloc-add-support-for-highmem-pages-fix remove unneeded preempt_disable/enable Cc: Akinobu Mita Signed-off-by: Andrew Morton <> --- diff --git a/mm/debug-pagealloc.c b/mm/debug-pagealloc.c index bda7ed044eb1..7cea557407f4 100644 --- a/mm/debug-pagealloc.c +++ b/mm/debug-pagealloc.c @@ -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)