diff options
author | Pekka Enberg <penberg@kernel.org> | 2011-03-11 18:10:45 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-03-11 18:10:45 +0200 |
commit | c9149556756d56c68451a4a8735c37e7062fd3d7 (patch) | |
tree | a2dae56b22adaa9a23c8f92f30c3b3ad3b610850 /mm/migrate.c | |
parent | d71f606f687ef9d0cdddfd3619ca7cb9a0b3fb63 (diff) | |
parent | 5bfe53a77e8a3ffce4a10003c75f464a138e272d (diff) | |
download | op-kernel-dev-c9149556756d56c68451a4a8735c37e7062fd3d7.zip op-kernel-dev-c9149556756d56c68451a4a8735c37e7062fd3d7.tar.gz |
Merge branch 'slab/rcu' into slab/next
Conflicts:
mm/slub.c
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 46fe8cc..352de555 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -772,6 +772,7 @@ uncharge: unlock: unlock_page(page); +move_newpage: if (rc != -EAGAIN) { /* * A page that has been migrated has all references @@ -785,8 +786,6 @@ unlock: putback_lru_page(page); } -move_newpage: - /* * Move the new page to the LRU. If migration was not successful * then this will free the page. @@ -888,7 +887,7 @@ out: * are movable anymore because to has become empty * or no retryable pages exist anymore. * Caller should call putback_lru_pages to return pages to the LRU - * or free list. + * or free list only if ret != 0. * * Return: Number of pages not migrated or error code. */ @@ -981,10 +980,6 @@ int migrate_huge_pages(struct list_head *from, } rc = 0; out: - - list_for_each_entry_safe(page, page2, from, lru) - put_page(page); - if (rc) return rc; @@ -1292,14 +1287,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages, return -EPERM; /* Find the mm_struct */ - read_lock(&tasklist_lock); + rcu_read_lock(); task = pid ? find_task_by_vpid(pid) : current; if (!task) { - read_unlock(&tasklist_lock); + rcu_read_unlock(); return -ESRCH; } mm = get_task_mm(task); - read_unlock(&tasklist_lock); + rcu_read_unlock(); if (!mm) return -EINVAL; |