patch-1.3.60 linux/fs/open.c

Next file: linux/fs/proc/array.c
Previous file: linux/fs/nfs/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.59/linux/fs/open.c linux/fs/open.c
@@ -68,7 +68,7 @@
 
 	down(&inode->i_sem);
 	newattrs.ia_size = length;
-	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME | ATTR_MTIME;
+	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
 	error = notify_change(inode, &newattrs);
 	if (!error) {
 		/* truncate virtual mappings of this file */
@@ -386,7 +386,7 @@
 		newattrs.ia_valid |= ATTR_MODE;
 	}
 	inode->i_dirt = 1;
-	if (inode->i_sb->dq_op) {
+	if (inode->i_sb && inode->i_sb->dq_op) {
 		inode->i_sb->dq_op->initialize(inode, -1);
 		if (inode->i_sb->dq_op->transfer(inode, &newattrs, 0))
 			return -EDQUOT;

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