From 19b905b23fbafb2356a7a76a4e949e48555816e9 Mon Sep 17 00:00:00 2001 From: MinChan Kim Date: Wed, 11 Feb 2009 13:04:27 -0800 Subject: [PATCH] --- yaml --- r: 131283 b: refs/heads/master c: 508b9f8efdad123b202b228f71f59feba51e4fb5 h: refs/heads/master i: 131281: 107830f76ce187330317f6e54e25eef12787fc34 131279: 0a9953c7d37992c6410752930e43348046f18b50 v: v3 --- [refs] | 2 +- trunk/mm/rmap.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8623fa859db6..0a46b82f8b3a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 02ac597c9b86af49b2016aa98aee20ab59dbf0d2 +refs/heads/master: 508b9f8efdad123b202b228f71f59feba51e4fb5 diff --git a/trunk/mm/rmap.c b/trunk/mm/rmap.c index ac4af8cffbf9..16521664010d 100644 --- a/trunk/mm/rmap.c +++ b/trunk/mm/rmap.c @@ -1072,7 +1072,8 @@ static int try_to_unmap_file(struct page *page, int unlock, int migration) spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { if (MLOCK_PAGES && unlikely(unlock)) { - if (!(vma->vm_flags & VM_LOCKED)) + if (!((vma->vm_flags & VM_LOCKED) && + page_mapped_in_vma(page, vma))) continue; /* must visit all vmas */ ret = SWAP_MLOCK; } else {