Loading mm/memory.c +3 −9 Original line number Diff line number Diff line Loading @@ -388,7 +388,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ { unsigned long pfn = pte_pfn(pte); if (vma->vm_flags & VM_PFNMAP) { if (unlikely(vma->vm_flags & VM_PFNMAP)) { unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT; if (pfn == vma->vm_pgoff + off) return NULL; Loading @@ -396,18 +396,12 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ return NULL; } /* * Add some anal sanity checks for now. Eventually, * we should just do "return pfn_to_page(pfn)", but * in the meantime we check that we get a valid pfn, * and that the resulting page looks ok. * * Remove this test eventually! */ #ifdef CONFIG_DEBUG_VM if (unlikely(!pfn_valid(pfn))) { print_bad_pte(vma, pte, addr); return NULL; } #endif /* * NOTE! We still have PageReserved() pages in the page Loading mm/rmap.c +4 −5 Original line number Diff line number Diff line Loading @@ -56,13 +56,11 @@ #include <asm/tlbflush.h> //#define RMAP_DEBUG /* can be enabled only for debugging */ struct kmem_cache *anon_vma_cachep; static inline void validate_anon_vma(struct vm_area_struct *find_vma) { #ifdef RMAP_DEBUG #ifdef CONFIG_DEBUG_VM struct anon_vma *anon_vma = find_vma->anon_vma; struct vm_area_struct *vma; unsigned int mapcount = 0; Loading Loading @@ -551,13 +549,14 @@ void page_add_file_rmap(struct page *page) void page_remove_rmap(struct page *page) { if (atomic_add_negative(-1, &page->_mapcount)) { if (page_mapcount(page) < 0) { #ifdef CONFIG_DEBUG_VM if (unlikely(page_mapcount(page) < 0)) { printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page)); printk (KERN_EMERG " page->flags = %lx\n", page->flags); printk (KERN_EMERG " page->count = %x\n", page_count(page)); printk (KERN_EMERG " page->mapping = %p\n", page->mapping); } #endif BUG_ON(page_mapcount(page) < 0); /* * It would be tidy to reset the PageAnon mapping here, Loading Loading
mm/memory.c +3 −9 Original line number Diff line number Diff line Loading @@ -388,7 +388,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ { unsigned long pfn = pte_pfn(pte); if (vma->vm_flags & VM_PFNMAP) { if (unlikely(vma->vm_flags & VM_PFNMAP)) { unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT; if (pfn == vma->vm_pgoff + off) return NULL; Loading @@ -396,18 +396,12 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ return NULL; } /* * Add some anal sanity checks for now. Eventually, * we should just do "return pfn_to_page(pfn)", but * in the meantime we check that we get a valid pfn, * and that the resulting page looks ok. * * Remove this test eventually! */ #ifdef CONFIG_DEBUG_VM if (unlikely(!pfn_valid(pfn))) { print_bad_pte(vma, pte, addr); return NULL; } #endif /* * NOTE! We still have PageReserved() pages in the page Loading
mm/rmap.c +4 −5 Original line number Diff line number Diff line Loading @@ -56,13 +56,11 @@ #include <asm/tlbflush.h> //#define RMAP_DEBUG /* can be enabled only for debugging */ struct kmem_cache *anon_vma_cachep; static inline void validate_anon_vma(struct vm_area_struct *find_vma) { #ifdef RMAP_DEBUG #ifdef CONFIG_DEBUG_VM struct anon_vma *anon_vma = find_vma->anon_vma; struct vm_area_struct *vma; unsigned int mapcount = 0; Loading Loading @@ -551,13 +549,14 @@ void page_add_file_rmap(struct page *page) void page_remove_rmap(struct page *page) { if (atomic_add_negative(-1, &page->_mapcount)) { if (page_mapcount(page) < 0) { #ifdef CONFIG_DEBUG_VM if (unlikely(page_mapcount(page) < 0)) { printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page)); printk (KERN_EMERG " page->flags = %lx\n", page->flags); printk (KERN_EMERG " page->count = %x\n", page_count(page)); printk (KERN_EMERG " page->mapping = %p\n", page->mapping); } #endif BUG_ON(page_mapcount(page) < 0); /* * It would be tidy to reset the PageAnon mapping here, Loading