]> err.no Git - linux-2.6/blobdiff - mm/swap_state.c
Merge branch 'upstream' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6...
[linux-2.6] / mm / swap_state.c
index 7b09ac503fec9dde77422705a08b2a1f087d0d70..e0e1583f32c26cc2579554a4abcc797a9a671553 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/buffer_head.h>
 #include <linux/backing-dev.h>
 #include <linux/pagevec.h>
+#include <linux/migrate.h>
 
 #include <asm/pgtable.h>
 
@@ -27,6 +28,7 @@ static struct address_space_operations swap_aops = {
        .writepage      = swap_writepage,
        .sync_page      = block_sync_page,
        .set_page_dirty = __set_page_dirty_nobuffers,
+       .migratepage    = migrate_page,
 };
 
 static struct backing_dev_info swap_backing_dev_info = {
@@ -146,8 +148,7 @@ int add_to_swap(struct page * page, gfp_t gfp_mask)
        swp_entry_t entry;
        int err;
 
-       if (!PageLocked(page))
-               BUG();
+       BUG_ON(!PageLocked(page));
 
        for (;;) {
                entry = get_swap_page();