* [PATCH] mm: D-cache flushing was forgotten
@ 2006-10-06 9:44 Dmitriy Monakhov
0 siblings, 0 replies; only message in thread
From: Dmitriy Monakhov @ 2006-10-06 9:44 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-mm, viro, David Miller, Dmitriy Monakhov
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
Here is a patch that add D-cache flushing routine
after page was changed. It is forgotten in current code.
David Miller agree with patch.
Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
[-- Attachment #2: diff-buffer-flush-dcache-page --]
[-- Type: text/plain, Size: 624 bytes --]
diff --git a/fs/buffer.c b/fs/buffer.c
index 71649ef..b2652aa 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2008,6 +2008,7 @@ static int __block_prepare_write(struct
clear_buffer_new(bh);
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr+block_start, 0, bh->b_size);
+ flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
set_buffer_uptodate(bh);
mark_buffer_dirty(bh);
@@ -2514,6 +2515,7 @@ failed:
*/
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr, 0, PAGE_CACHE_SIZE);
+ flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
SetPageUptodate(page);
set_page_dirty(page);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-06 10:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 9:44 [PATCH] mm: D-cache flushing was forgotten Dmitriy Monakhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.