mm: thp: split_huge_pmd_address() comment improvement
authorAndrea Arcangeli <[email protected]>
Fri, 20 May 2016 23:58:27 +0000 (16:58 -0700)
committerLinus Torvalds <[email protected]>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
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/[email protected]
Signed-off-by: Andrea Arcangeli <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Alex Williamson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/huge_memory.c

index 86eafd91c982348544a63eac18cf69ba533d190f..1764184c4774037dba0dcaf3e92050b20942305a 100644 (file)
@@ -3023,8 +3023,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);
 }