Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 1999 10:33:00 -0700 (PDT)
From:      Matthew Jacob <mjacob@feral.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-hackers@FreeBSD.ORG, peter@FreeBSD.ORG
Subject:   Re: D'oh!
Message-ID:  <Pine.BSF.4.05.9906151030470.5752-100000@semuta.feral.com>
In-Reply-To: <199906151729.KAA19516@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> :
> 
>      The problem is that peter is not releasing the nfs_node_hash_lock
>      when he goes to retry, creating a deadlock with himself.
> 
>      Peter, looks like a quick fix & commit to me, I'd say just go ahead
>      and do it.
> 
>      Heh, I just realized how funny that first statement was :-)


Yup, that's my take too.... waking up any waiters to re-contend seemed
correct to do too....

Index: nfs_node.c
===================================================================
RCS file: /home/ncvs/src/sys/nfs/nfs_node.c,v
retrieving revision 1.29
diff -c -r1.29 nfs_node.c
*** nfs_node.c	1999/06/05 05:26:36	1.29
--- nfs_node.c	1999/06/15 17:19:49
***************
*** 167,172 ****
--- 167,175 ----
  		    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;
  		goto retry;
  	}
  	LIST_INSERT_HEAD(nhpp, np, n_hash);


If peter doesn't respond by this afternoon, I'll commit it. I've tried it
on -current so far.

-matt




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9906151030470.5752-100000>