Skip to contentSkip to conversation

mm: D-cache flushing was forgotten

PATCH New Dmitriy Monakhov 1 participant 1 message Oct 6, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: D-cache flushing was forgotten

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.

fs/buffer.c +2 -0
index 71649ef..b2652aa 100644
@@ -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);