summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authortrhodes <trhodes@FreeBSD.org>2006-01-21 12:10:33 +0000
committertrhodes <trhodes@FreeBSD.org>2006-01-21 12:10:33 +0000
commitf9cd8b5d9fa9549bd689754887b1ff6e550bcd37 (patch)
tree39dff1f6f29fe158069c27ee617eb04bba36477f /sys/nfsserver
parent6c0a42a20ab9fa4b37d71344774cea9265670eed (diff)
downloadFreeBSD-src-f9cd8b5d9fa9549bd689754887b1ff6e550bcd37.zip
FreeBSD-src-f9cd8b5d9fa9549bd689754887b1ff6e550bcd37.tar.gz
Remove some dead code.
Found with: Coverity Prevent(tm)
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index e366745..9e7aa42 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -525,17 +525,13 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
NFSD_UNLOCK();
mtx_lock(&Giant); /* VFS */
if (error) {
- if (dirp) {
- vrele(dirp);
- dirp = NULL;
- }
- mtx_unlock(&Giant); /* VFS */
- NFSD_LOCK();
- nfsm_reply(NFSX_POSTOPATTR(v3));
- if (v3)
- nfsm_srvpostop_attr(dirattr_ret, &dirattr);
- error = 0;
- goto nfsmout;
+ mtx_unlock(&Giant); /* VFS */
+ NFSD_LOCK();
+ nfsm_reply(NFSX_POSTOPATTR(v3));
+ if (v3)
+ nfsm_srvpostop_attr(dirattr_ret, &dirattr);
+ error = 0;
+ goto nfsmout;
}
/*
@@ -599,11 +595,6 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
}
}
- if (dirp) {
- vrele(dirp);
- dirp = NULL;
- }
-
/*
* Resources at this point:
* ndp->ni_vp may not be NULL
@@ -664,8 +655,6 @@ nfsmout:
NFSD_LOCK_ASSERT();
NFSD_UNLOCK();
mtx_lock(&Giant); /* VFS */
- if (dirp)
- vrele(dirp);
NDFREE(&nd, NDF_ONLY_PNBUF);
if (ndp->ni_startdir)
vrele(ndp->ni_startdir);
OpenPOWER on IntegriCloud