patch-1.3.69 linux/fs/xiafs/file.c

Next file: linux/include/asm-i386/smp.h
Previous file: linux/fs/umsdos/mangle.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.68/linux/fs/xiafs/file.c linux/fs/xiafs/file.c
@@ -17,6 +17,7 @@
 #include <linux/fcntl.h>
 #include <linux/stat.h>
 #include <linux/locks.h>
+#include <linux/pagemap.h>
 
 #include <asm/segment.h>
 #include <asm/system.h>
@@ -234,13 +235,14 @@
 	    }
 	}
 	cp = (pos & (XIAFS_ZSIZE(inode->i_sb)-1)) + bh->b_data;
+	memcpy_fromfs(cp,buf,c);
+	update_vm_cache(inode,pos,cp,c);
 	pos += c;
 	if (pos > inode->i_size) {
 	    inode->i_size = pos;
 	    inode->i_dirt = 1;
 	}
 	written += c;
-	memcpy_fromfs(cp,buf,c);
 	buf += c;
 	mark_buffer_uptodate(bh, 1);
 	mark_buffer_dirty(bh, 0);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this