summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2010-04-02 01:53:48 +0000
committerrmacklem <rmacklem@FreeBSD.org>2010-04-02 01:53:48 +0000
commit3c1cb2234543d2ac7f9976f651bb502939cc40ec (patch)
treed90fcb4fa2a2a114164f200b7d31553124550c66 /sys/fs
parent31655aa073d830cae5a16558e8153b2af80d6c1d (diff)
downloadFreeBSD-src-3c1cb2234543d2ac7f9976f651bb502939cc40ec.zip
FreeBSD-src-3c1cb2234543d2ac7f9976f651bb502939cc40ec.tar.gz
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. Tested by: lampa AT fit.vutbr.cz (link case) Submitted by: lampa AT fit.vutbr.cz (link case) MFC after: 2 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdserv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index e56610b..9a36287 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -1086,7 +1086,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, __unused int isdgram,
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, int isdgram,
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, __unused int isdgram,
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) {
OpenPOWER on IntegriCloud