mm/migrate.c: call detach_page_private to cleanup code
[linux-block.git] / mm / migrate.c
index 7160c1556f797fa961b77065e47e57e628ebf3de..fb425d86c1151491a12fff4cb140a1aa6702fb34 100644 (file)
@@ -797,10 +797,7 @@ recheck_buffers:
        if (rc != MIGRATEPAGE_SUCCESS)
                goto unlock_buffers;
 
-       ClearPagePrivate(page);
-       set_page_private(newpage, page_private(page));
-       set_page_private(page, 0);
-       put_page(page);
+       attach_page_private(newpage, detach_page_private(page));
        get_page(newpage);
 
        bh = head;
@@ -810,8 +807,6 @@ recheck_buffers:
 
        } while (bh != head);
 
-       SetPagePrivate(newpage);
-
        if (mode != MIGRATE_SYNC_NO_COPY)
                migrate_page_copy(newpage, page);
        else
@@ -1032,7 +1027,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
                 * to the LRU. Later, when the IO completes the pages are
                 * marked uptodate and unlocked. However, the queueing
                 * could be merging multiple pages for one bio (e.g.
-                * mpage_readpages). If an allocation happens for the
+                * mpage_readahead). If an allocation happens for the
                 * second or third page, the process can end up locking
                 * the same page twice and deadlocking. Rather than
                 * trying to be clever about what pages can be locked,