]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix loop device cache handling
authorAndrew Morton <akpm@osdl.org>
Thu, 3 Jun 2004 00:59:59 +0000 (17:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 00:59:59 +0000 (17:59 -0700)
From: Russell King <rmk+lkml@arm.linux.org.uk>

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 <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/loop.c

index 95ec95cfa6f00a92b653adb652d292669cc624f8..f1250943c167f52700fcb5086380d7a117ecab2c 100644 (file)
@@ -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;