mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
[PATCH] reiserfs: add missing D-cache flushing
Looks like, reiserfs_prepare_file_region_for_write() doesn't contain several flush_dcache_page() calls. Found with help from Dmitriy Monakhov <dmonakhov@openvz.org> [akpm@osdl.org: small speedup] Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org> Cc: Dmitriy Monakhov <dmonakhov@openvz.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
360276042d
commit
de21c57b90
1 changed files with 4 additions and 0 deletions
|
@ -1045,6 +1045,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
|
||||||
char *kaddr = kmap_atomic(prepared_pages[0], KM_USER0);
|
char *kaddr = kmap_atomic(prepared_pages[0], KM_USER0);
|
||||||
memset(kaddr, 0, from);
|
memset(kaddr, 0, from);
|
||||||
kunmap_atomic(kaddr, KM_USER0);
|
kunmap_atomic(kaddr, KM_USER0);
|
||||||
|
flush_dcache_page(prepared_pages[0]);
|
||||||
}
|
}
|
||||||
if (to != PAGE_CACHE_SIZE) { /* Last page needs to be partially zeroed */
|
if (to != PAGE_CACHE_SIZE) { /* Last page needs to be partially zeroed */
|
||||||
char *kaddr =
|
char *kaddr =
|
||||||
|
@ -1052,6 +1053,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
|
||||||
KM_USER0);
|
KM_USER0);
|
||||||
memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
|
memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
|
||||||
kunmap_atomic(kaddr, KM_USER0);
|
kunmap_atomic(kaddr, KM_USER0);
|
||||||
|
flush_dcache_page(prepared_pages[num_pages - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Since all blocks are new - use already calculated value */
|
/* Since all blocks are new - use already calculated value */
|
||||||
|
@ -1185,6 +1187,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
|
||||||
memset(kaddr + block_start, 0,
|
memset(kaddr + block_start, 0,
|
||||||
from - block_start);
|
from - block_start);
|
||||||
kunmap_atomic(kaddr, KM_USER0);
|
kunmap_atomic(kaddr, KM_USER0);
|
||||||
|
flush_dcache_page(prepared_pages[0]);
|
||||||
set_buffer_uptodate(bh);
|
set_buffer_uptodate(bh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1222,6 +1225,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
|
||||||
KM_USER0);
|
KM_USER0);
|
||||||
memset(kaddr + to, 0, block_end - to);
|
memset(kaddr + to, 0, block_end - to);
|
||||||
kunmap_atomic(kaddr, KM_USER0);
|
kunmap_atomic(kaddr, KM_USER0);
|
||||||
|
flush_dcache_page(prepared_pages[num_pages - 1]);
|
||||||
set_buffer_uptodate(bh);
|
set_buffer_uptodate(bh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue