patch-2.0.36 linux/fs/fat/file.c
Next file: linux/fs/fat/misc.c
Previous file: linux/fs/fat/fatfs_syms.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Sun Nov 15 10:33:13 1998
- Orig file:
v2.0.35/linux/fs/fat/file.c
- Orig date:
Mon Jul 13 13:46:37 1998
diff -u --recursive --new-file v2.0.35/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -324,6 +324,12 @@
#else
if (count <= 0) return 0;
#endif
+ if (filp->f_pos + count > 0x7FFFFFFFL) {
+ count = 0x7FFFFFFFL - filp->f_pos;
+ if (!count)
+ return -EFBIG;
+ }
+
error = carry = 0;
for (start = buf; count || carry; count -= size) {
while (!(sector = fat_smap(inode,filp->f_pos >> SECTOR_BITS)))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov