提交 8c581651 编写于 作者: M Monakhov Dmitriy 提交者: Linus Torvalds

[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" <davem@davemloft.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 97e860d3
...@@ -1854,6 +1854,7 @@ static int __block_prepare_write(struct inode *inode, struct page *page, ...@@ -1854,6 +1854,7 @@ static int __block_prepare_write(struct inode *inode, struct page *page,
clear_buffer_new(bh); clear_buffer_new(bh);
kaddr = kmap_atomic(page, KM_USER0); kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr+block_start, 0, bh->b_size); memset(kaddr+block_start, 0, bh->b_size);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
set_buffer_uptodate(bh); set_buffer_uptodate(bh);
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
...@@ -2360,6 +2361,7 @@ int nobh_prepare_write(struct page *page, unsigned from, unsigned to, ...@@ -2360,6 +2361,7 @@ int nobh_prepare_write(struct page *page, unsigned from, unsigned to,
*/ */
kaddr = kmap_atomic(page, KM_USER0); kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr, 0, PAGE_CACHE_SIZE); memset(kaddr, 0, PAGE_CACHE_SIZE);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
SetPageUptodate(page); SetPageUptodate(page);
set_page_dirty(page); set_page_dirty(page);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册