aboutsummaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index a33e779d1bd8..a7427bbf57e4 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -559,7 +559,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma)
559 swap_duplicate(entry); 559 swap_duplicate(entry);
560 if (list_empty(&mm->mmlist)) { 560 if (list_empty(&mm->mmlist)) {
561 spin_lock(&mmlist_lock); 561 spin_lock(&mmlist_lock);
562 list_add(&mm->mmlist, &init_mm.mmlist); 562 if (list_empty(&mm->mmlist))
563 list_add(&mm->mmlist, &init_mm.mmlist);
563 spin_unlock(&mmlist_lock); 564 spin_unlock(&mmlist_lock);
564 } 565 }
565 set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); 566 set_pte_at(mm, address, pte, swp_entry_to_pte(entry));