summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2014-01-21 15:49:48 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-21 16:19:45 -0800
commit051ac83adf69eea4f57a97356e4282e395a5fa6d (patch)
tree82961f46bc13e50e8a6aacad99dcd09c8df0ff4d /mm/migrate.c
parentfaecd8dd852d4e4a63a1b8ad43e5df8e41ee0336 (diff)
downloadop-kernel-dev-051ac83adf69eea4f57a97356e4282e395a5fa6d.zip
op-kernel-dev-051ac83adf69eea4f57a97356e4282e395a5fa6d.tar.gz
mm/rmap: make rmap_walk to get the rmap_walk_control argument
In each rmap traverse case, there is some difference so that we need function pointers and arguments to them in order to handle these For this purpose, struct rmap_walk_control is introduced in this patch, and will be extended in following patch. Introducing and extending are separate, because it clarify changes. 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 'mm/migrate.c')
-rw-r--r--mm/migrate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 9194375..11d89dc 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -199,7 +199,12 @@ out:
*/
static void remove_migration_ptes(struct page *old, struct page *new)
{
- rmap_walk(new, remove_migration_pte, old);
+ struct rmap_walk_control rwc = {
+ .rmap_one = remove_migration_pte,
+ .arg = old,
+ };
+
+ rmap_walk(new, &rwc);
}
/*
OpenPOWER on IntegriCloud