Re: acquiring duplicate lock of same type: "vnode interlock"

From: Bruce Evans <bde_at_zeta.org.au>
Date: Fri, 13 Feb 2004 12:58:04 +1100 (EST)
On Fri, 13 Feb 2004, Jun Kuriyama wrote:

> At Fri, 13 Feb 2004 06:16:21 +1100 (EST),
> Bruce Evans wrote:
> > [about some style bugs :)]
>
> Thanks!  Is this better than I committed?
>
> Index: ffs_snapshot.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_snapshot.c,v
> retrieving revision 1.78
> diff -u -r1.78 ffs_snapshot.c
> --- ffs_snapshot.c	12 Feb 2004 08:52:08 -0000	1.78
> +++ ffs_snapshot.c	12 Feb 2004 23:33:07 -0000
> _at__at_ -488,7 +488,9 _at__at_
>  	VI_LOCK(devvp);
>  	snaphead = &devvp->v_rdev->si_snapshots;
>  	if ((xp = TAILQ_FIRST(snaphead)) != NULL) {
> -		struct lock *lkp = ITOV(xp)->v_vnlock;
> +		struct lock *lkp;
> +
> +		lkp = ITOV(xp)->v_vnlock;
>  		VI_UNLOCK(devvp);
>  		VI_LOCK(vp);
>  		vp->v_vnlock = lkp;
> [... similarly]

Yes.

Bruce
Received on Thu Feb 12 2004 - 16:58:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:42 UTC