From 4bd5e5d6ac920bd737184895b412f0c9480df66a Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 5 Oct 2011 11:43:04 +1100 Subject: [PATCH] debug-pagealloc-add-support-for-highmem-pages-fix remove unneeded preempt_disable/enable Cc: Akinobu Mita Signed-off-by: Andrew Morton --- mm/debug-pagealloc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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) -- 2.39.5