patch-2.3.20 linux/fs/buffer.c

Next file: linux/fs/dcache.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.19/linux/fs/buffer.c linux/fs/buffer.c
@@ -1512,8 +1512,8 @@
 	char * target_buf, *target_data;
 	unsigned long data_offset = offset;
 
-	offset = page->offset-inode->i_size;
-	if (offset < 0) 
+	offset = inode->i_size - page->offset;
+	if (page->offset>inode->i_size)
 		offset = 0;
 	else if (offset >= data_offset)
 		offset = data_offset;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)