patch-2.3.26 linux/fs/read_write.c
Next file: linux/fs/sysv/namei.c
Previous file: linux/fs/proc/kcore.c
Back to the patch index
Back to the overall index
-  Lines: 15
-  Date:
Fri Nov  5 09:57:30 1999
-  Orig file: 
v2.3.25/linux/fs/read_write.c
-  Orig date: 
Tue Sep  7 12:14:07 1999
diff -u --recursive --new-file v2.3.25/linux/fs/read_write.c linux/fs/read_write.c
@@ -63,8 +63,12 @@
 	    !(inode = dentry->d_inode))
 		goto out_putf;
 	retval = -EINVAL;
-	if (origin <= 2)
-		retval = llseek(file, offset, origin);
+	if (origin <= 2) {
+		loff_t res = llseek(file, offset, origin);
+		retval = res;
+		if (res != (loff_t)retval)
+			retval = -EOVERFLOW;	/* LFS: should only happen on 32 bit platforms */
+	}
 out_putf:
 	fput(file);
 bad:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)