mm: fix anonymous dirtying
[pandora-kernel.git] / mm / migrate.c
index 153572f..d493c02 100644 (file)
@@ -605,7 +605,7 @@ static int move_to_new_page(struct page *newpage, struct page *page)
         * establishing additional references. We are the only one
         * holding a reference to the new page at this point.
         */
-       if (TestSetPageLocked(newpage))
+       if (!trylock_page(newpage))
                BUG();
 
        /* Prepare mapping for the new page.*/
@@ -667,7 +667,7 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
        BUG_ON(charge);
 
        rc = -EAGAIN;
-       if (TestSetPageLocked(page)) {
+       if (!trylock_page(page)) {
                if (!force)
                        goto move_newpage;
                lock_page(page);
@@ -979,10 +979,10 @@ set_status:
  * Move a list of pages in the address space of the currently executing
  * process.
  */
-asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
-                       const void __user * __user *pages,
-                       const int __user *nodes,
-                       int __user *status, int flags)
+SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
+               const void __user * __user *, pages,
+               const int __user *, nodes,
+               int __user *, status, int, flags)
 {
        int err = 0;
        int i;