patch-2.2.0-pre1 linux/fs/fat/file.c
Next file: linux/fs/fat/inode.c
Previous file: linux/fs/devices.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Sun Dec 27 10:47:18 1998
- Orig file:
v2.1.132/linux/fs/fat/file.c
- Orig date:
Wed Aug 26 11:37:40 1998
diff -u --recursive --new-file v2.1.132/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -375,6 +375,12 @@
*ppos = inode->i_size;
if (count == 0)
return 0;
+ if (*ppos + count > 0x7FFFFFFFLL) {
+ count = 0x7FFFFFFFLL-*ppos;
+ if (!count)
+ return -EFBIG;
+ }
+
error = carry = 0;
for (start = buf; count || carry; count -= size) {
while (!(sector = fat_smap(inode,*ppos >> SECTOR_BITS)))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov