mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] brd: fix cacheflushing
@ 2009-04-15  8:32 Nick Piggin
  0 siblings, 0 replies; only message in thread
From: Nick Piggin @ 2009-04-15  8:32 UTC (permalink / raw)
  To: Jens Axboe, Linux Kernel Mailing List

brd is missing a flush_dcache_page. On 2nd thoughts, perhaps it is the
pagecache's responsibility to flush user virtual aliases (the driver of
course should flush kernel virtual mappings)... but anyway, there
already exists cache flushing for one direction of transfer, so we
should add the other.

Signed-off-by: Nick Piggin <npiggin@suse.de>

---
 drivers/block/brd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/block/brd.c
===================================================================
--- linux-2.6.orig/drivers/block/brd.c
+++ linux-2.6/drivers/block/brd.c
@@ -275,8 +275,10 @@ static int brd_do_bvec(struct brd_device
 	if (rw == READ) {
 		copy_from_brd(mem + off, brd, sector, len);
 		flush_dcache_page(page);
-	} else
+	} else {
+		flush_dcache_page(page);
 		copy_to_brd(brd, mem + off, sector, len);
+	}
 	kunmap_atomic(mem, KM_USER0);
 
 out:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-15  8:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15  8:32 [patch] brd: fix cacheflushing Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®