|author||Hugh Dickins <email@example.com>||2009-12-14 17:59:22 -0800|
|committer||Linus Torvalds <firstname.lastname@example.org>||2009-12-15 08:53:19 -0800|
ksm: fix mlockfreed to munlocked
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 (and whinges "Page flag mlocked set for process" in mmotm, whereas mainline is silently forgiving). Call munlock_vma_page() to fix that. Signed-off-by: Hugh Dickins <email@example.com> Cc: Izik Eidus <firstname.lastname@example.org> Cc: Andrea Arcangeli <email@example.com> Cc: Chris Wright <firstname.lastname@example.org> Acked-by: Rik van Riel <email@example.com> Acked-by: Mel Gorman <firstname.lastname@example.org> Signed-off-by: Andrew Morton <email@example.com> Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
Diffstat (limited to 'mm/internal.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/internal.h b/mm/internal.h
index cb7d92d0a46..a4b927cdca0 100644
@@ -105,9 +105,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