diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2014-01-21 18:49:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:45 -0500 |
commit | 52629506420ce32997f1fba0a1ab2f1aaa9a4f79 (patch) | |
tree | 1dd4e4fbe8f192a0f940adbf466b5cce07e9b6a2 /include | |
parent | 0dd1c7bbce8d1d142bb25aefaa50262dfd77cb78 (diff) |
mm/rmap: use rmap_walk() in try_to_unmap()
Now, we have an infrastructure in rmap_walk() to handle difference from
variants of rmap traversing functions.
So, just use it in try_to_unmap().
In this patch, I change following things.
1. enable rmap_walk() if !CONFIG_MIGRATION.
2. mechanical change to use rmap_walk() in try_to_unmap().
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/rmap.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 616aa4d05f0a..2462458708cd 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -190,7 +190,7 @@ int page_referenced_one(struct page *, struct vm_area_struct *, | |||
190 | 190 | ||
191 | int try_to_unmap(struct page *, enum ttu_flags flags); | 191 | int try_to_unmap(struct page *, enum ttu_flags flags); |
192 | int try_to_unmap_one(struct page *, struct vm_area_struct *, | 192 | int try_to_unmap_one(struct page *, struct vm_area_struct *, |
193 | unsigned long address, enum ttu_flags flags); | 193 | unsigned long address, void *arg); |
194 | 194 | ||
195 | /* | 195 | /* |
196 | * Called from mm/filemap_xip.c to unmap empty zero page | 196 | * Called from mm/filemap_xip.c to unmap empty zero page |
@@ -256,9 +256,6 @@ struct rmap_walk_control { | |||
256 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); | 256 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); |
257 | }; | 257 | }; |
258 | 258 | ||
259 | /* | ||
260 | * Called by migrate.c to remove migration ptes, but might be used more later. | ||
261 | */ | ||
262 | int rmap_walk(struct page *page, struct rmap_walk_control *rwc); | 259 | int rmap_walk(struct page *page, struct rmap_walk_control *rwc); |
263 | 260 | ||
264 | #else /* !CONFIG_MMU */ | 261 | #else /* !CONFIG_MMU */ |