From 9b82900ad0e9ae8cac5f04fc6c8e100f94d20b3a Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 2 Jun 2004 17:59:59 -0700 Subject: [PATCH] [PATCH] Fix loop device cache handling From: Russell King It appears the loop driver has had one flush_dcache_page() call added for the case where it writes to the backing device page cache pages. However, it seems to be missing the call where it writes to its own page cache pages. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/loop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 95ec95cfa6f00..f1250943c167f 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -308,7 +308,9 @@ lo_read_actor(read_descriptor_t *desc, struct page *page, page->index); desc->error = -EINVAL; } - + + flush_dcache_page(p->page); + desc->count = count - size; desc->written += size; p->offset += size; -- 2.53.0