mm/zswap.c: avoid unnecessary copy-in at map time
[linux-2.6-microblaze.git] / mm / zswap.c
index 2076326..c27ce9f 100644 (file)
@@ -1203,7 +1203,7 @@ static int zswap_frontswap_store(unsigned type, pgoff_t offset,
                zswap_reject_alloc_fail++;
                goto put_dstmem;
        }
-       buf = zpool_map_handle(entry->pool->zpool, handle, ZPOOL_MM_RW);
+       buf = zpool_map_handle(entry->pool->zpool, handle, ZPOOL_MM_WO);
        memcpy(buf, &zhdr, hlen);
        memcpy(buf + hlen, dst, dlen);
        zpool_unmap_handle(entry->pool->zpool, handle);
@@ -1427,18 +1427,11 @@ static int __init zswap_debugfs_init(void)
 
        return 0;
 }
-
-static void __exit zswap_debugfs_exit(void)
-{
-       debugfs_remove_recursive(zswap_debugfs_root);
-}
 #else
 static int __init zswap_debugfs_init(void)
 {
        return 0;
 }
-
-static void __exit zswap_debugfs_exit(void) { }
 #endif
 
 /*********************************