summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
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/nfsclient
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/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index b07a358..0b5109a 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -776,7 +776,7 @@ nfs_lookup(struct vop_lookup_args *ap)
long len;
nfsfh_t *fhp;
struct nfsnode *np;
- int wantparent, error = 0, attrflag, fhsize;
+ int error = 0, attrflag, fhsize;
int v3 = NFS_ISV3(dvp);
struct thread *td = cnp->cn_thread;
@@ -786,7 +786,6 @@ nfs_lookup(struct vop_lookup_args *ap)
return (EROFS);
if (dvp->v_type != VDIR)
return (ENOTDIR);
- wantparent = flags & (LOCKPARENT|WANTPARENT);
nmp = VFSTONFS(dvp->v_mount);
np = VTONFS(dvp);
if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) {
@@ -836,7 +835,7 @@ nfs_lookup(struct vop_lookup_args *ap)
/*
* Handle RENAME case...
*/
- if (cnp->cn_nameiop == RENAME && wantparent && (flags & ISLASTCN)) {
+ if (cnp->cn_nameiop == RENAME && (flags & ISLASTCN)) {
if (NFS_CMPFH(np, fhp, fhsize)) {
m_freem(mrep);
return (EISDIR);
OpenPOWER on IntegriCloud