Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1301864

[PATCH v2 1/8] mm: Convert an open-coded VM_BUG_ON_VMA

From Matthew Wilcox <matthew.r.wilcox@intel.com>
Newsgroups linux.kernel
Subject [PATCH v2 1/8] mm: Convert an open-coded VM_BUG_ON_VMA
Date 2016-01-05 19:40 +0100
Message-ID <qNEGv-6GR-39@gated-at.bofh.it> (permalink)
References <qNEGu-6GR-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Matthew Wilcox <willy@linux.intel.com>

Spotted during PUD support review.

Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
---
 mm/memory.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 416b129..8c6392c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1178,15 +1178,7 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
 		next = pmd_addr_end(addr, end);
 		if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) {
 			if (next - addr != HPAGE_PMD_SIZE) {
-#ifdef CONFIG_DEBUG_VM
-				if (!rwsem_is_locked(&tlb->mm->mmap_sem)) {
-					pr_err("%s: mmap_sem is unlocked! addr=0x%lx end=0x%lx vma->vm_start=0x%lx vma->vm_end=0x%lx\n",
-						__func__, addr, end,
-						vma->vm_start,
-						vma->vm_end);
-					BUG();
-				}
-#endif
+				VM_BUG_ON_VMA(!rwsem_is_locked(&tlb->mm->mmap_sem), vma);
 				split_huge_pmd(vma, pmd, addr);
 			} else if (zap_huge_pmd(tlb, vma, pmd, addr))
 				goto next;
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/8] Support for transparent PUD pages for DAX files Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 3/8] mm: Add optional support for PUD-sized transparent hugepages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 5/8] procfs: Add support for PUDs to smaps, clear_refs and pagemap Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 8/8] ext4: Support for PUD-sized transparent huge pages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 7/8] dax: Support for transparent PUD pages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 1/8] mm: Convert an open-coded VM_BUG_ON_VMA Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 6/8] x86: Add support for PUD-sized transparent hugepages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100
  [PATCH v2 2/8] mm,fs,dax: Change ->pmd_fault to ->huge_fault Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-05 19:40 +0100

csiph-web