[PATCH] mm, thp: fix comment inconsistency for swapin readahead functions
From: Ebru Akagunduz
Date: Sat Jun 18 2016 - 14:07:22 EST
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@xxxxxxxxx>
---
mm/huge_memory.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index acd374e..f0d528e 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2436,9 +2436,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;
+ }
}
if (ret & VM_FAULT_ERROR) {
trace_mm_collapse_huge_page_swapin(mm, swapped_in, 0);
@@ -2513,8 +2514,8 @@ static void collapse_huge_page(struct mm_struct *mm,
if (allocstall == curr_allocstall && swap != 0) {
/*
* __collapse_huge_page_swapin always returns with mmap_sem
- * locked. If it fails, release mmap_sem and jump directly
- * out. Continuing to collapse causes inconsistency.
+ * locked. 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)) {
mem_cgroup_cancel_charge(new_page, memcg, true);
--
1.9.1