Apply by doing:
	cd /usr/src/sys/nfs
	patch < nfs3_solaris7.patch

Index: nfs_vnops.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_vnops.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- nfs_vnops.c	1998/08/19 22:26:57	1.22
+++ nfs_vnops.c	1999/01/10 20:06:51	1.23
@@ -599,7 +599,7 @@
  		case VFIFO:
 			if (vap->va_mtime.tv_sec == VNOVAL &&
 			    vap->va_atime.tv_sec == VNOVAL &&
-			    vap->va_mode == (u_short)VNOVAL &&
+			    vap->va_mode == (mode_t)VNOVAL &&
 			    vap->va_uid == (uid_t)VNOVAL &&
 			    vap->va_gid == (gid_t)VNOVAL)
 				return (0);
@@ -661,69 +661,12 @@
 	nfsm_reqhead(vp, NFSPROC_SETATTR, NFSX_FH(v3) + NFSX_SATTR(v3));
 	nfsm_fhtom(vp, v3);
 	if (v3) {
-		if (vap->va_mode != (u_short)VNOVAL) {
-			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
-			*tl++ = nfs_true;
-			*tl = txdr_unsigned(vap->va_mode);
-		} else {
-			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-			*tl = nfs_false;
-		}
-		if (vap->va_uid != (uid_t)VNOVAL) {
-			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
-			*tl++ = nfs_true;
-			*tl = txdr_unsigned(vap->va_uid);
-		} else {
-			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-			*tl = nfs_false;
-		}
-		if (vap->va_gid != (gid_t)VNOVAL) {
-			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
-			*tl++ = nfs_true;
-			*tl = txdr_unsigned(vap->va_gid);
-		} else {
-			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-			*tl = nfs_false;
-		}
-		if (vap->va_size != VNOVAL) {
-			nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
-			*tl++ = nfs_true;
-			txdr_hyper(&vap->va_size, tl);
-		} else {
-			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-			*tl = nfs_false;
-		}
-		if (vap->va_atime.tv_sec != VNOVAL) {
-			if (vap->va_atime.tv_sec != time.tv_sec) {
-				nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
-				*tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);
-				txdr_nfsv3time(&vap->va_mtime, tl);
-			} else {
-				nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-				*tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);
-			}
-		} else {
-			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-			*tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);
-		}
-		if (vap->va_mtime.tv_sec != VNOVAL) {
-			if (vap->va_mtime.tv_sec != time.tv_sec) {
-				nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
-				*tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);
-				txdr_nfsv3time(&vap->va_mtime, tl);
-			} else {
-				nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-				*tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);
-			}
-		} else {
-			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
-			*tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);
-		}
+		nfsm_v3attrbuild(vap, TRUE);
 		nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
 		*tl = nfs_false;
 	} else {
 		nfsm_build(sp, struct nfsv2_sattr *, NFSX_V2SATTR);
-		if (vap->va_mode == (u_short)VNOVAL)
+		if (vap->va_mode == (mode_t)VNOVAL)
 			sp->sa_mode = nfs_xdrneg1;
 		else
 			sp->sa_mode = vtonfsv2_mode(vp->v_type, vap->va_mode);
@@ -1165,7 +1108,6 @@
 	register struct vattr *vap;
 {
 	register struct nfsv2_sattr *sp;
-	register struct nfsv3_sattr *sp3;
 	register u_int32_t *tl;
 	register caddr_t cp;
 	register int32_t t1, t2;
@@ -1193,10 +1135,9 @@
 	nfsm_fhtom(dvp, v3);
 	nfsm_strtom(cnp->cn_nameptr, cnp->cn_namelen, NFS_MAXNAMLEN);
 	if (v3) {
-		nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_V3SRVSATTR);
+		nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
 		*tl++ = vtonfsv3_type(vap->va_type);
-		sp3 = (struct nfsv3_sattr *)tl;
-		nfsm_v3sattr(sp3, vap);
+		nfsm_v3attrbuild(vap, FALSE);
 		if (vap->va_type == VCHR || vap->va_type == VBLK) {
 			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
 			*tl++ = txdr_unsigned(major(vap->va_rdev));
@@ -1286,7 +1227,6 @@
 	register struct vattr *vap = ap->a_vap;
 	register struct componentname *cnp = ap->a_cnp;
 	register struct nfsv2_sattr *sp;
-	register struct nfsv3_sattr *sp3;
 	register u_int32_t *tl;
 	register caddr_t cp;
 	register int32_t t1, t2;
@@ -1316,18 +1256,16 @@
 	if (v3) {
 		nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);
 		if (fmode & O_EXCL) {
-		    *tl = txdr_unsigned(NFSV3CREATE_EXCLUSIVE);
-		    nfsm_build(tl, u_int32_t *, NFSX_V3CREATEVERF);
-		    if (in_ifaddr.tqh_first)
-			*tl++ = in_ifaddr.tqh_first->ia_addr.sin_addr.s_addr;
-		    else
-			*tl++ = create_verf;
-		    *tl = ++create_verf;
+			*tl = txdr_unsigned(NFSV3CREATE_EXCLUSIVE);
+			nfsm_build(tl, u_int32_t *, NFSX_V3CREATEVERF);
+			if (in_ifaddr.tqh_first)
+				*tl++ = in_ifaddr.tqh_first->ia_addr.sin_addr.s_addr;
+			else
+				*tl++ = create_verf;
+			*tl = ++create_verf;
 		} else {
-		    *tl = txdr_unsigned(NFSV3CREATE_UNCHECKED);
-		    nfsm_build(tl, u_int32_t *, NFSX_V3SRVSATTR);
-		    sp3 = (struct nfsv3_sattr *)tl;
-		    nfsm_v3sattr(sp3, vap);
+			*tl = txdr_unsigned(NFSV3CREATE_UNCHECKED);
+			nfsm_v3attrbuild(vap, FALSE);
 		}
 	} else {
 		nfsm_build(sp, struct nfsv2_sattr *, NFSX_V2SATTR);
@@ -1708,7 +1646,6 @@
 	register struct vattr *vap = ap->a_vap;
 	register struct componentname *cnp = ap->a_cnp;
 	register struct nfsv2_sattr *sp;
-	register struct nfsv3_sattr *sp3;
 	register u_int32_t *tl;
 	register caddr_t cp;
 	register int32_t t1, t2;
@@ -1724,10 +1661,8 @@
 	    nfsm_rndup(cnp->cn_namelen) + nfsm_rndup(slen) + NFSX_SATTR(v3));
 	nfsm_fhtom(dvp, v3);
 	nfsm_strtom(cnp->cn_nameptr, cnp->cn_namelen, NFS_MAXNAMLEN);
-	if (v3) {
-		nfsm_build(sp3, struct nfsv3_sattr *, NFSX_V3SRVSATTR);
-		nfsm_v3sattr(sp3, vap);
-	}
+	if (v3)
+		nfsm_v3attrbuild(vap, FALSE);
 	nfsm_strtom(ap->a_target, slen, NFS_MAXPATHLEN);
 	if (!v3) {
 		nfsm_build(sp, struct nfsv2_sattr *, NFSX_V2SATTR);
@@ -1777,7 +1712,6 @@
 	register struct vattr *vap = ap->a_vap;
 	register struct componentname *cnp = ap->a_cnp;
 	register struct nfsv2_sattr *sp;
-	register struct nfsv3_sattr *sp3;
 	register u_int32_t *tl;
 	register caddr_t cp;
 	register int32_t t1, t2;
@@ -1797,8 +1731,7 @@
 	nfsm_fhtom(dvp, v3);
 	nfsm_strtom(cnp->cn_nameptr, len, NFS_MAXNAMLEN);
 	if (v3) {
-		nfsm_build(sp3, struct nfsv3_sattr *, NFSX_V3SRVSATTR);
-		nfsm_v3sattr(sp3, vap);
+		nfsm_v3attrbuild(vap, FALSE);
 	} else {
 		nfsm_build(sp, struct nfsv2_sattr *, NFSX_V2SATTR);
 		sp->sa_mode = vtonfsv2_mode(VDIR, vap->va_mode);
Index: nfsm_subs.h
===================================================================
RCS file: /cvs/src/sys/nfs/nfsm_subs.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nfsm_subs.h	1998/08/19 22:26:58	1.8
+++ nfsm_subs.h	1999/01/10 20:06:53	1.9
@@ -228,17 +228,68 @@
 			(f) = ttattrf; \
 		} }
 
-#define nfsm_v3sattr(s, a) \
-		{ (s)->sa_modetrue = nfs_true; \
-		(s)->sa_mode = vtonfsv3_mode((a)->va_mode); \
-		(s)->sa_uidfalse = nfs_false; \
-		(s)->sa_gidfalse = nfs_false; \
-		(s)->sa_sizefalse = nfs_false; \
-		(s)->sa_atimetype = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); \
-		txdr_nfsv3time(&(a)->va_atime, &(s)->sa_atime); \
-		(s)->sa_mtimetype = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); \
-		txdr_nfsv3time(&(a)->va_mtime, &(s)->sa_mtime); \
+/* If full is true, set all fields, otherwise just set mode and time fields */
+#define nfsm_v3attrbuild(a, full)						\
+		{ if ((a)->va_mode != (mode_t)VNOVAL) {				\
+			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);		\
+			*tl++ = nfs_true;					\
+			*tl = txdr_unsigned((a)->va_mode);			\
+		} else {							\
+			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);		\
+			*tl = nfs_false;					\
+		}								\
+		if ((full) && (a)->va_uid != (uid_t)VNOVAL) {			\
+			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);		\
+			*tl++ = nfs_true;					\
+			*tl = txdr_unsigned((a)->va_uid);			\
+		} else {							\
+			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);		\
+			*tl = nfs_false;					\
+		}								\
+		if ((full) && (a)->va_gid != (gid_t)VNOVAL) {			\
+			nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED);		\
+			*tl++ = nfs_true;					\
+			*tl = txdr_unsigned((a)->va_gid);			\
+		} else {							\
+			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);		\
+			*tl = nfs_false;					\
+		}								\
+		if ((full) && (a)->va_size != VNOVAL) {				\
+			nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED);		\
+			*tl++ = nfs_true;					\
+			txdr_hyper(&(a)->va_size, tl);				\
+		} else {							\
+			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);		\
+			*tl = nfs_false;					\
+		}								\
+		if ((a)->va_atime.tv_sec != VNOVAL) {				\
+			if ((a)->va_atime.tv_sec != time.tv_sec) {		\
+				nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED);	\
+				*tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);	\
+				txdr_nfsv3time(&(a)->va_atime, tl);		\
+			} else {						\
+				nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);	\
+				*tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);	\
+			}							\
+		} else {							\
+			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);		\
+			*tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);		\
+		}								\
+		if ((a)->va_mtime.tv_sec != VNOVAL) {				\
+			if ((a)->va_mtime.tv_sec != time.tv_sec) {		\
+				nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED);	\
+				*tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT);	\
+				txdr_nfsv3time(&(a)->va_mtime, tl);		\
+			} else {						\
+				nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);	\
+				*tl = txdr_unsigned(NFSV3SATTRTIME_TOSERVER);	\
+			}							\
+		} else {							\
+			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);		\
+			*tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE);		\
+		}								\
 		}
+				
 
 #define	nfsm_strsiz(s,m) \
 		{ nfsm_dissect(tl,u_int32_t *,NFSX_UNSIGNED); \
