mm, thp: fix comment inconsistency for swapin readahead functions
[deliverable/linux.git] / mm / khugepaged.c
index 93d5f87c00d57c392e43c8bd1c1e5b0df15ca0bc..566148489e338698eb81e379be7aa4d5789cb6c6 100644 (file)
@@ -891,9 +891,10 @@ static bool __collapse_huge_page_swapin(struct mm_struct *mm,
                /* do_swap_page returns VM_FAULT_RETRY with released mmap_sem */
                if (ret & VM_FAULT_RETRY) {
                        down_read(&mm->mmap_sem);
-                       /* vma is no longer available, don't continue to swapin */
-                       if (hugepage_vma_revalidate(mm, address))
+                       if (hugepage_vma_revalidate(mm, address)) {
+                               /* vma is no longer available, don't continue to swapin */
                                return false;
+                       }
                        /* check if the pmd is still valid */
                        if (mm_find_pmd(mm, address) != pmd)
                                return false;
@@ -969,7 +970,7 @@ static void collapse_huge_page(struct mm_struct *mm,
 
        /*
         * __collapse_huge_page_swapin always returns with mmap_sem locked.
-        * If it fails, release mmap_sem and jump directly out.
+        * If it fails, we release mmap_sem and jump out_nolock.
         * Continuing to collapse causes inconsistency.
         */
        if (!__collapse_huge_page_swapin(mm, vma, address, pmd)) {
This page took 0.02451 seconds and 5 git commands to generate.