Just like we have a call flush_dcache_read() after zrma_bvec_read(), add missing flush_dcache_page() call before zram_bdev_write() in order to handle the cache congruency of the kernel and userspace mappings of page for REQ_OP_WRITE handling. Signed-off-by: Chaitanya Kulkarni <kch@xxxxxxxxxx> --- drivers/block/zram/zram_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index fc37419b3735..a7954ae80d40 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1887,6 +1887,7 @@ static void zram_bio_rw(struct zram *zram, struct bio *bio) SECTOR_SHIFT; if (op_is_write(bio_op(bio))) { + flush_dcache_page(bv.bv_page); ret = zram_bvec_write(zram, &bv, index, offset, bio); if (ret < 0) { atomic64_inc(&zram->stats.failed_writes); -- 2.40.0