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

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)