patch-2.0.37 linux/fs/open.c
Next file: linux/fs/proc/array.c
Previous file: linux/fs/nls_iso8859_15.c
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
Sun Jun 13 10:21:03 1999
- Orig file:
v2.0.36/linux/fs/open.c
- Orig date:
Sat Nov 30 02:21:19 1996
diff -u --recursive --new-file v2.0.36/linux/fs/open.c linux/fs/open.c
@@ -68,6 +68,10 @@
int error;
struct iattr newattrs;
+ /* Not pretty: "inode->i_size" shouldn't really be "off_t". But it is. */
+ if ((off_t) length < 0)
+ return -EINVAL;
+
down(&inode->i_sem);
newattrs.ia_size = length;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov