[PATCH 3/3] zram: add flush_dcache_page() call for write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux