diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2014-01-21 18:49:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:45 -0500 |
commit | e8351ac9bfa7f4412d5d196b6742309473ca506d (patch) | |
tree | a7110ca9274ac25e72f3fac02cc7ba5e934e995b /include | |
parent | 52629506420ce32997f1fba0a1ab2f1aaa9a4f79 (diff) |
mm/rmap: use rmap_walk() in try_to_munlock()
Now, we have an infrastructure in rmap_walk() to handle difference from
variants of rmap traversing functions.
So, just use it in try_to_munlock().
In this patch, I change following things.
1. remove some variants of rmap traversing functions.
cf> try_to_unmap_ksm, try_to_unmap_anon, try_to_unmap_file
2. mechanical change to use rmap_walk() in try_to_munlock().
3. copy and paste comments.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ksm.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/ksm.h b/include/linux/ksm.h index 0eef8cb0baf7..91b9719722c3 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h | |||
@@ -75,7 +75,6 @@ struct page *ksm_might_need_to_copy(struct page *page, | |||
75 | 75 | ||
76 | int page_referenced_ksm(struct page *page, | 76 | int page_referenced_ksm(struct page *page, |
77 | struct mem_cgroup *memcg, unsigned long *vm_flags); | 77 | struct mem_cgroup *memcg, unsigned long *vm_flags); |
78 | int try_to_unmap_ksm(struct page *page, enum ttu_flags flags); | ||
79 | int rmap_walk_ksm(struct page *page, struct rmap_walk_control *rwc); | 78 | int rmap_walk_ksm(struct page *page, struct rmap_walk_control *rwc); |
80 | void ksm_migrate_page(struct page *newpage, struct page *oldpage); | 79 | void ksm_migrate_page(struct page *newpage, struct page *oldpage); |
81 | 80 | ||
@@ -114,11 +113,6 @@ static inline int page_referenced_ksm(struct page *page, | |||
114 | return 0; | 113 | return 0; |
115 | } | 114 | } |
116 | 115 | ||
117 | static inline int try_to_unmap_ksm(struct page *page, enum ttu_flags flags) | ||
118 | { | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | static inline int rmap_walk_ksm(struct page *page, | 116 | static inline int rmap_walk_ksm(struct page *page, |
123 | struct rmap_walk_control *rwc) | 117 | struct rmap_walk_control *rwc) |
124 | { | 118 | { |