summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-29 13:09:42 +0000
committerjeff <jeff@FreeBSD.org>2005-03-29 13:09:42 +0000
commitca1e4c2fe08ddca6d8bb843c635cb05b2ccf61ae (patch)
tree92eb84a2d2d9af54ef213ce03aa350828627dfe2 /sys/fs/nwfs
parent7d8081dca491f34620fcb86e26b6a1e24275de75 (diff)
downloadFreeBSD-src-ca1e4c2fe08ddca6d8bb843c635cb05b2ccf61ae.zip
FreeBSD-src-ca1e4c2fe08ddca6d8bb843c635cb05b2ccf61ae.tar.gz
- Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT.
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_vnops.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c
index be452da..e5780d2 100644
--- a/sys/fs/nwfs/nwfs_vnops.c
+++ b/sys/fs/nwfs/nwfs_vnops.c
@@ -836,7 +836,7 @@ nwfs_lookup(ap)
struct nw_entry_info fattr, *fap;
ncpfid fid;
int nameiop=cnp->cn_nameiop, islastcn;
- int wantparent, error = 0, notfound;
+ int error = 0, notfound;
struct thread *td = cnp->cn_thread;
char _name[cnp->cn_namelen+1];
bcopy(cnp->cn_nameptr, _name, cnp->cn_namelen);
@@ -857,7 +857,6 @@ nwfs_lookup(ap)
return (EROFS);
if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)))
return (error);
- wantparent = flags & (LOCKPARENT|WANTPARENT);
nmp = VFSTONWFS(mp);
dnp = VTONW(dvp);
/*
@@ -943,7 +942,7 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
return (notfound); /* hard error */
if (notfound) { /* entry not found */
/* Handle RENAME or CREATE case... */
- if ((nameiop == CREATE || nameiop == RENAME) && wantparent && islastcn) {
+ if ((nameiop == CREATE || nameiop == RENAME) && islastcn) {
cnp->cn_flags |= SAVENAME;
return (EJUSTRETURN);
}
@@ -966,7 +965,7 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
cnp->cn_flags |= SAVENAME; /* I free it later */
return (0);
}
- if (nameiop == RENAME && islastcn && wantparent) {
+ if (nameiop == RENAME && islastcn) {
error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred, cnp->cn_thread);
if (error) return (error);
if (NWCMPF(&dnp->n_fid, &fid)) return EISDIR;
OpenPOWER on IntegriCloud