svn commit: r206691 - stable/8/sys/fs/nfsserver

Rick Macklem rmacklem at FreeBSD.org
Fri Apr 16 01:39:31 UTC 2010


Author: rmacklem
Date: Fri Apr 16 01:39:30 2010
New Revision: 206691
URL: http://svn.freebsd.org/changeset/base/206691

Log:
  MFC: r206061
  Add SAVENAME to the cn_flags for all cases in the experimental
  NFS server for the CREATE cn_nameiop where SAVESTART isn't set.
  I was not aware that this needed to be done by the caller until
  recently.

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdserv.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c	Thu Apr 15 23:56:05 2010	(r206690)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 16 01:39:30 2010	(r206691)
@@ -1086,7 +1086,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, 
 		case NFFIFO:
 			break;
 		case NFDIR:
-			cnflags = LOCKPARENT;
+			cnflags = (LOCKPARENT | SAVENAME);
 			break;
 		default:
 			nd->nd_repstat = NFSERR_BADTYPE;
@@ -1549,7 +1549,8 @@ nfsrvd_link(struct nfsrv_descript *nd, i
 				NFSVOPUNLOCK(dp, 0, p);
 		}
 	}
-	NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT);
+	NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE,
+	    LOCKPARENT | SAVENAME);
 	if (!nd->nd_repstat) {
 		nfsvno_setpathbuf(&named, &bufp, &hashp);
 		error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen);
@@ -1743,7 +1744,8 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, 
 		nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft);
 		return (0);
 	}
-	NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT);
+	NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE,
+	    LOCKPARENT | SAVENAME);
 	nfsvno_setpathbuf(&named, &bufp, &hashp);
 	error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen);
 	if (error) {


More information about the svn-src-all mailing list