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.
This commit is contained in:
Matt Jacob 1999-06-15 23:24:14 +00:00
parent 28808d20e9
commit e672bf9cd6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47938
2 changed files with 10 additions and 2 deletions

View File

@ -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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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);

View File

@ -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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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);