From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758375AbcEFPEI (ORCPT ); Fri, 6 May 2016 11:04:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50857 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757979AbcEFPEE (ORCPT ); Fri, 6 May 2016 11:04:04 -0400 From: Andrea Arcangeli To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Alex Williamson , "Kirill A. Shutemov" Subject: [PATCH 3/3] mm: thp: split_huge_pmd_address() comment improvement Date: Fri, 6 May 2016 17:04:00 +0200 Message-Id: <1462547040-1737-4-git-send-email-aarcange@redhat.com> In-Reply-To: <1462547040-1737-1-git-send-email-aarcange@redhat.com> References: <1462547040-1737-1-git-send-email-aarcange@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Comment is partly wrong, this improves it by including the case of split_huge_pmd_address() called by try_to_unmap_one if TTU_SPLIT_HUGE_PMD is set. Signed-off-by: Andrea Arcangeli --- mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9086793..1fbe13d 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3031,8 +3031,10 @@ void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address, return; /* - * Caller holds the mmap_sem write mode, so a huge pmd cannot - * materialize from under us. + * Caller holds the mmap_sem write mode or the anon_vma lock, + * so a huge pmd cannot materialize from under us (khugepaged + * holds both the mmap_sem write mode and the anon_vma lock + * write mode). */ __split_huge_pmd(vma, pmd, address, freeze); }