patch-1.3.60 linux/fs/nfs/inode.c

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

diff -u --recursive --new-file v1.3.59/linux/fs/nfs/inode.c linux/fs/nfs/inode.c
@@ -248,37 +248,34 @@
 	struct nfs_fattr fattr;
 	int error;
 
+	sattr.mode = (unsigned) -1;
 	if (attr->ia_valid & ATTR_MODE) 
 		sattr.mode = attr->ia_mode;
-	else
-		sattr.mode = (unsigned) -1;
 
+	sattr.uid = (unsigned) -1;
 	if (attr->ia_valid & ATTR_UID)
 		sattr.uid = attr->ia_uid;
-	else
-		sattr.uid = (unsigned) -1;
 
+	sattr.gid = (unsigned) -1;
 	if (attr->ia_valid & ATTR_GID)
 		sattr.gid = attr->ia_gid;
-	else
-		sattr.gid = (unsigned) -1;
 
+
+	sattr.size = (unsigned) -1;
 	if (attr->ia_valid & ATTR_SIZE)
 		sattr.size = S_ISREG(inode->i_mode) ? attr->ia_size : -1;
-	else
-		sattr.size = (unsigned) -1;
 
-	if (attr->ia_valid & ATTR_MTIME_SET) {
+	sattr.mtime.seconds = sattr.mtime.useconds = (unsigned) -1;
+	if (attr->ia_valid & ATTR_MTIME) {
 		sattr.mtime.seconds = attr->ia_mtime;
 		sattr.mtime.useconds = 0;
-	} else 
-		sattr.mtime.seconds = sattr.mtime.useconds = (unsigned) -1;
+	}
 
-	if (attr->ia_valid & ATTR_ATIME_SET) {
+	sattr.atime.seconds = sattr.atime.useconds = (unsigned) -1;
+	if (attr->ia_valid & ATTR_ATIME) {
 		sattr.atime.seconds = attr->ia_atime;
 		sattr.atime.useconds = 0;
-	} else
-		sattr.atime.seconds = sattr.atime.useconds = (unsigned) -1;
+	}
 
 	error = nfs_proc_setattr(NFS_SERVER(inode), NFS_FH(inode),
 		&sattr, &fattr);

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