From d6c6e33e74853062b8aa19659212d74bd3ab0f2d Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 1 May 2006 12:16:08 -0700 Subject: [PATCH] --- yaml --- r: 26409 b: refs/heads/master c: 4c28f81193b6778f7b49090930d88e6d12bcb928 h: refs/heads/master i: 26407: a2d5ae5a42c4927c90f184bd0d652d53ece0d369 v: v3 --- [refs] | 2 +- trunk/mm/migrate.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8e90d1bd3f0e..4bf241b12ebf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a4b741e380cb56045ccea36f2dbc10e42af21f24 +refs/heads/master: 4c28f81193b6778f7b49090930d88e6d12bcb928 diff --git a/trunk/mm/migrate.c b/trunk/mm/migrate.c index d444229f2599..1c25040693d2 100644 --- a/trunk/mm/migrate.c +++ b/trunk/mm/migrate.c @@ -439,6 +439,17 @@ int migrate_pages(struct list_head *from, struct list_head *to, goto unlock_both; } + /* Make sure the dirty bit is up to date */ + if (try_to_unmap(page, 1) == SWAP_FAIL) { + rc = -EPERM; + goto unlock_both; + } + + if (page_mapcount(page)) { + rc = -EAGAIN; + goto unlock_both; + } + /* * Default handling if a filesystem does not provide * a migration function. We can only migrate clean