]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mm: fix misuse of debug_kmap_atomic
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 2 Apr 2009 07:01:26 +0000 (16:01 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 16:49:41 +0000 (09:49 -0700)
Commit 7ca43e7564679604d86e9ed834e7bbcffd8a4a3f ("mm: use debug_kmap_atomic")
introduced some debug_kmap_atomic() in wrong places.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/mm/highmem_32.c
arch/x86/mm/iomap_32.c

index 5bc5d1688c1c771730ba6fa1ecdea1bafe959767..8126e8d1a2a4a789509cb49af563b6cbb76395ae 100644 (file)
@@ -40,7 +40,6 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
 
        debug_kmap_atomic(type);
 
-       debug_kmap_atomic(type);
        idx = type + KM_TYPE_NR*smp_processor_id();
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
        BUG_ON(!pte_none(*(kmap_pte-idx)));
index bff0c9032f8c6f7045518d9fdd2bd417a3be7634..e331f77348a787608c0c6cfe82bd022d81eb42aa 100644 (file)
@@ -39,6 +39,7 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
 
        pagefault_disable();
 
+       debug_kmap_atomic(type);
        idx = type + KM_TYPE_NR * smp_processor_id();
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
        set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
@@ -72,7 +73,6 @@ iounmap_atomic(void *kvaddr, enum km_type type)
        unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
        enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
 
-       debug_kmap_atomic(type);
        /*
         * Force other mappings to Oops if they'll try to access this pte
         * without first remap it.  Keeping stale mappings around is a bad idea