patch-2.1.5 linux/mm/filemap.c
Next file: linux/net/ipv4/af_inet.c
Previous file: linux/include/asm-i386/vm86.h
Back to the patch index
Back to the overall index
-  Lines: 12
-  Date:
Thu Oct 17 17:15:21 1996
-  Orig file: 
v2.1.4/linux/mm/filemap.c
-  Orig date: 
Wed Oct 16 10:48:30 1996
diff -u --recursive --new-file v2.1.4/linux/mm/filemap.c linux/mm/filemap.c
@@ -573,8 +573,10 @@
 	unsigned long pos, ppos, page_cache;
 	int reada_ok;
 
-	if (!access_ok(VERIFY_WRITE, buf,count))
+	if (!access_ok(VERIFY_WRITE, buf, count))
 		return -EFAULT;
+	if (!count)
+		return 0;
 	error = 0;
 	read = 0;
 	page_cache = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov