patch-1.3.45 linux/fs/open.c
Next file: linux/fs/read_write.c
Previous file: linux/fs/nfs/nfsroot.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Mon Nov 27 09:19:56 1995
- Orig file:
v1.3.44/linux/fs/open.c
- Orig date:
Mon Oct 23 18:02:17 1995
diff -u --recursive --new-file v1.3.44/linux/fs/open.c linux/fs/open.c
@@ -66,10 +66,12 @@
struct iattr newattrs;
/* truncate virtual mappings of this file */
+ down(&inode->i_sem);
vmtruncate(inode, length);
inode->i_size = newattrs.ia_size = length;
if (inode->i_op && inode->i_op->truncate)
inode->i_op->truncate(inode);
+ up(&inode->i_sem);
newattrs.ia_ctime = newattrs.ia_mtime = CURRENT_TIME;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME | ATTR_MTIME;
inode->i_dirt = 1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this