From f9cd8b5d9fa9549bd689754887b1ff6e550bcd37 Mon Sep 17 00:00:00 2001 From: trhodes Date: Sat, 21 Jan 2006 12:10:33 +0000 Subject: Remove some dead code. Found with: Coverity Prevent(tm) --- sys/nfsserver/nfs_serv.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'sys/nfsserver') 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); -- cgit v1.1