summaryrefslogtreecommitdiff
path: root/mm/internal.h
diff options
context:
space:
mode:
authorHugh Dickins <hugh.dickins@tiscali.co.uk>2009-12-30 23:00:30 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-01-06 15:05:22 -0800
commit8ac9e802007e99534ec66af850ef7b099df27499 (patch)
treefde720a1f13b82f58f10edd51d583eb293e305e6 /mm/internal.h
parentb2ea8cb9c8f1937cb80b9beb50548a05bfc37819 (diff)
ksm: fix mlockfreed to munlocked
2.6.33-rc1 commit 73848b4684e84a84cfd1555af78d41158f31e16b, adjusted to include 31e855ea7173bdb0520f9684580423a9560f66e0's movement of the unlock_page(oldpage), but omit other intervening cleanups. When KSM merges an mlocked page, it has been forgetting to munlock it: that's been left to free_page_mlock(), which reports it in /proc/vmstat as unevictable_pgs_mlockfreed instead of unevictable_pgs_munlocked, which indicates that such pages _might_ be left unevictable for long after they should be evictable. Call munlock_vma_page() to fix that. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 22ec8d2b0fb8..17bc0df273bb 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -107,9 +107,10 @@ static inline int is_mlocked_vma(struct vm_area_struct *vma, struct page *page)
}
/*
- * must be called with vma's mmap_sem held for read, and page locked.
+ * must be called with vma's mmap_sem held for read or write, and page locked.
*/
extern void mlock_vma_page(struct page *page);
+extern void munlock_vma_page(struct page *page);
/*
* Clear the page's PageMlocked(). This can be useful in a situation where