--- a/mm/zswap.c~mm-zswapc-avoid-unnecessary-copy-in-at-map-time +++ a/mm/zswap.c @@ -1203,7 +1203,7 @@ static int zswap_frontswap_store(unsigne 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);