aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/file.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@openvz.org>2006-12-06 23:38:02 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:38 -0500
commitde21c57b90b3716f6f951e88e039d00ab6729ce9 (patch)
treed7a1e24a44907c01ff7c94f7ebff802a8eac13d7 /fs/reiserfs/file.c
parent360276042d7a8369ce912acff99c1c4de394b312 (diff)
[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>
Diffstat (limited to 'fs/reiserfs/file.c')
-rw-r--r--fs/reiserfs/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index ac14318c81ba..6526498949d8 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -1045,6 +1045,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
1045 char *kaddr = kmap_atomic(prepared_pages[0], KM_USER0); 1045 char *kaddr = kmap_atomic(prepared_pages[0], KM_USER0);
1046 memset(kaddr, 0, from); 1046 memset(kaddr, 0, from);
1047 kunmap_atomic(kaddr, KM_USER0); 1047 kunmap_atomic(kaddr, KM_USER0);
1048 flush_dcache_page(prepared_pages[0]);
1048 } 1049 }
1049 if (to != PAGE_CACHE_SIZE) { /* Last page needs to be partially zeroed */ 1050 if (to != PAGE_CACHE_SIZE) { /* Last page needs to be partially zeroed */
1050 char *kaddr = 1051 char *kaddr =
@@ -1052,6 +1053,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
1052 KM_USER0); 1053 KM_USER0);
1053 memset(kaddr + to, 0, PAGE_CACHE_SIZE - to); 1054 memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
1054 kunmap_atomic(kaddr, KM_USER0); 1055 kunmap_atomic(kaddr, KM_USER0);
1056 flush_dcache_page(prepared_pages[num_pages - 1]);
1055 } 1057 }
1056 1058
1057 /* Since all blocks are new - use already calculated value */ 1059 /* Since all blocks are new - use already calculated value */
@@ -1185,6 +1187,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
1185 memset(kaddr + block_start, 0, 1187 memset(kaddr + block_start, 0,
1186 from - block_start); 1188 from - block_start);
1187 kunmap_atomic(kaddr, KM_USER0); 1189 kunmap_atomic(kaddr, KM_USER0);
1190 flush_dcache_page(prepared_pages[0]);
1188 set_buffer_uptodate(bh); 1191 set_buffer_uptodate(bh);
1189 } 1192 }
1190 } 1193 }
@@ -1222,6 +1225,7 @@ static int reiserfs_prepare_file_region_for_write(struct inode *inode
1222 KM_USER0); 1225 KM_USER0);
1223 memset(kaddr + to, 0, block_end - to); 1226 memset(kaddr + to, 0, block_end - to);
1224 kunmap_atomic(kaddr, KM_USER0); 1227 kunmap_atomic(kaddr, KM_USER0);
1228 flush_dcache_page(prepared_pages[num_pages - 1]);
1225 set_buffer_uptodate(bh); 1229 set_buffer_uptodate(bh);
1226 } 1230 }
1227 } 1231 }