Hi Cong, Today's linux-next merge of the kmap_atomic tree got a conflict in drivers/staging/zram/zram_drv.c between commit fd1a30dea194 ("staging: zram: replace xvmalloc with zsmalloc") from the staging tree and commit ea81cfe7d7fb ("zram: remove the second argument of k[un]map_atomic()") from the kmap_atomic tree. I fixed it up (see below) and can carry the fix as necessary. -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx diff --cc drivers/staging/zram/zram_drv.c index 5833156,1cf68ad..0000000 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@@ -188,12 -195,12 +188,12 @@@ static void handle_uncompressed_page(st struct page *page = bvec->bv_page; unsigned char *user_mem, *cmem; - user_mem = kmap_atomic(page, KM_USER0); - cmem = kmap_atomic(zram->table[index].handle, KM_USER1); + user_mem = kmap_atomic(page); - cmem = kmap_atomic(zram->table[index].page); ++ cmem = kmap_atomic(zram->table[index].handle); memcpy(user_mem + bvec->bv_offset, cmem + offset, bvec->bv_len); - kunmap_atomic(cmem, KM_USER1); - kunmap_atomic(user_mem, KM_USER0); + kunmap_atomic(cmem); + kunmap_atomic(user_mem); flush_dcache_page(page); } @@@ -259,8 -267,8 +259,8 @@@ static int zram_bvec_read(struct zram * kfree(uncmem); } - kunmap_atomic(cmem); + zs_unmap_object(zram->mem_pool, zram->table[index].handle); - kunmap_atomic(user_mem, KM_USER0); + kunmap_atomic(user_mem); /* Should NEVER happen. Return bio error if it does. */ if (unlikely(ret != LZO_E_OK)) { @@@ -399,9 -407,8 +399,9 @@@ static int zram_bvec_write(struct zram store_offset = 0; zram_set_flag(zram, index, ZRAM_UNCOMPRESSED); zram_stat_inc(&zram->stats.pages_expand); - zram->table[index].page = page_store; + handle = page_store; - src = kmap_atomic(page, KM_USER0); - cmem = kmap_atomic(page_store, KM_USER1); + src = kmap_atomic(page); ++ cmem = kmap_atomic(page_store); goto memstore; } @@@ -426,15 -438,9 +426,15 @@@ memstore memcpy(cmem, src, clen); - kunmap_atomic(cmem); - if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) + if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) { - kunmap_atomic(cmem, KM_USER1); - kunmap_atomic(src, KM_USER0); ++ kunmap_atomic(cmem); + kunmap_atomic(src); + } else { + zs_unmap_object(zram->mem_pool, handle); + } + + zram->table[index].handle = handle; + zram->table[index].size = clen; /* Update stats */ zram_stat64_add(zram, &zram->stats.compr_size, clen);
Attachment:
pgpmr4IdGOfVu.pgp
Description: PGP signature