mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
97e860d364
commit
8c58165108
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue