patch-2.4.22 linux-2.4.22/fs/open.c
Next file: linux-2.4.22/fs/partitions/efi.c
Previous file: linux-2.4.22/fs/noquot.c
Back to the patch index
Back to the overall index
- Lines: 14
- Date:
2003-08-25 04:44:43.000000000 -0700
- Orig file:
linux-2.4.21/fs/open.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.21/fs/open.c linux-2.4.22/fs/open.c
@@ -105,11 +105,13 @@
if (length < 0)
return -EINVAL;
+ down_write(&inode->i_alloc_sem);
down(&inode->i_sem);
newattrs.ia_size = length;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
error = notify_change(dentry, &newattrs);
up(&inode->i_sem);
+ up_write(&inode->i_alloc_sem);
return error;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)