Subject: Re: More data. Re: kernel panic in nfs_reclaim (kern/17107)
To: Christos Zoulas <christos@zoulas.com>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 10/02/2002 21:17:36
On Wed, Oct 02, 2002 at 03:12:04PM -0400, Christos Zoulas wrote:
> Index: nfs_node.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/nfs/nfs_node.c,v
> retrieving revision 1.53
> diff -u -u -r1.53 nfs_node.c
> --- nfs_node.c	2002/03/16 23:05:25	1.53
> +++ nfs_node.c	2002/10/02 19:11:19
> @@ -272,7 +272,8 @@
>  	} */ *ap = v;
>  	struct vnode *vp = ap->a_vp;
>  	struct nfsnode *np = VTONFS(vp);
> -	struct nfsmount *nmp = VFSTONFS(vp->v_mount);
> +	extern struct simplelock mntvnode_slock;
> +	struct nfsmount *nmp;
>  
>  	if (prtactive && vp->v_usecount != 0)
>  		vprint("nfs_reclaim: pushing active", vp);
> @@ -282,9 +283,12 @@
>  	/*
>  	 * For nqnfs, take it off the timer queue as required.
>  	 */
> +	simple_lock(&mntvnode_slock);
> +	nmp = VFSTONFS(vp->v_mount);
>  	if ((nmp->nm_flag & NFSMNT_NQNFS) && np->n_timer.cqe_next != 0) {
>  		CIRCLEQ_REMOVE(&nmp->nm_timerhead, np, n_timer);
>  	}
> +	simple_unlock(&mntvnode_slock);

That won't make any difference on a uniprocessor machine (and not
on an MP machine either currently).

- Frank