summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>1999-06-15 23:24:14 +0000
committermjacob <mjacob@FreeBSD.org>1999-06-15 23:24:14 +0000
commit06fe6c5ca381b1685b94871a46780a3424e43a4c (patch)
tree40d3c3d10661991384e0de26537d15be6688b5bb /sys/nfs
parentd58122c6ddc951722dc9cb65b31aff192bc5b88f (diff)
downloadFreeBSD-src-06fe6c5ca381b1685b94871a46780a3424e43a4c.zip
FreeBSD-src-06fe6c5ca381b1685b94871a46780a3424e43a4c.tar.gz
If we retry this operation from the top of this routine, we need to
make sure we've freed any allocated resources (to avoid a memory leak) and and do the right thing with respect to the nfs node hash lock we'd acquired.
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_node.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c
index c3958c0..97db442 100644
--- a/sys/nfs/nfs_node.c
+++ b/sys/nfs/nfs_node.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
- * $Id: nfs_node.c,v 1.28 1998/09/29 23:15:25 mckusick Exp $
+ * $Id: nfs_node.c,v 1.29 1999/06/05 05:26:36 peter Exp $
*/
@@ -167,6 +167,10 @@ loop:
bcmp((caddr_t)fhp, (caddr_t)np2->n_fhp, fhsize))
continue;
vrele(vp);
+ if (nfs_node_hash_lock < 0)
+ wakeup(&nfs_node_hash_lock);
+ nfs_node_hash_lock = 0;
+ zfree(nfsnode_zone, np);
goto retry;
}
LIST_INSERT_HEAD(nhpp, np, n_hash);
OpenPOWER on IntegriCloud