From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by kanga.kvack.org (Postfix) with ESMTP id 5CE82828DE for ; Fri, 8 Jan 2016 14:49:57 -0500 (EST) Received: by mail-pa0-f47.google.com with SMTP id ho8so26290742pac.2 for ; Fri, 08 Jan 2016 11:49:57 -0800 (PST) Received: from mga01.intel.com (mga01.intel.com. [192.55.52.88]) by mx.google.com with ESMTP id us7si18660901pac.204.2016.01.08.11.49.56 for ; Fri, 08 Jan 2016 11:49:56 -0800 (PST) From: Matthew Wilcox Subject: [PATCH v3 1/8] mm: Convert an open-coded VM_BUG_ON_VMA Date: Fri, 8 Jan 2016 14:49:45 -0500 Message-Id: <1452282592-27290-2-git-send-email-matthew.r.wilcox@intel.com> In-Reply-To: <1452282592-27290-1-git-send-email-matthew.r.wilcox@intel.com> References: <1452282592-27290-1-git-send-email-matthew.r.wilcox@intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Matthew Wilcox , linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org From: Matthew Wilcox Spotted during PUD support review. Reported-by: Kirill A. Shutemov Signed-off-by: Matthew Wilcox --- mm/memory.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index f559e70..4150112 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1185,15 +1185,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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org