From: Monakhov Dmitriy Date: Wed, 11 Oct 2006 08:22:00 +0000 (-0700) Subject: [PATCH] D-cache aliasing issue in __block_prepare_write X-Git-Tag: v2.6.19-rc2~67 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c58165108e26d18849a0138c719e680f281197a;p=linux-2.6 [PATCH] D-cache aliasing issue in __block_prepare_write A couple of flush_dcache_page()s are missing on the I/O-error paths. Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/buffer.c b/fs/buffer.c index 2a7828c0e5..f65ef8821c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1854,6 +1854,7 @@ static int __block_prepare_write(struct inode *inode, struct page *page, 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); @@ -2360,6 +2361,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);