Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: thp: split_huge_pmd_address() comment improvement

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.

Link: http://lkml.kernel.org/r/1462547040-1737-4-git-send-email-aarcange@redhat.com
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrea Arcangeli and committed by
Linus Torvalds
d5ee7c3b 5f527c2b

+4 -2
+4 -2
mm/huge_memory.c
··· 3023 3023 return; 3024 3024 3025 3025 /* 3026 - * Caller holds the mmap_sem write mode, so a huge pmd cannot 3027 - * materialize from under us. 3026 + * Caller holds the mmap_sem write mode or the anon_vma lock, 3027 + * so a huge pmd cannot materialize from under us (khugepaged 3028 + * holds both the mmap_sem write mode and the anon_vma lock 3029 + * write mode). 3028 3030 */ 3029 3031 __split_huge_pmd(vma, pmd, address, freeze); 3030 3032 }