Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2004 12:40:23 -0700
From:      Nate Lawson <nate@root.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/md md.c
Message-ID:  <4149EC27.9080200@root.org>
In-Reply-To: <20040916185923.2F92316A552@hub.freebsd.org>
References:  <20040916185923.2F92316A552@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek wrote:
> pjd         2004-09-16 18:59:19 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/dev/md           md.c 
>   Log:
>   First wakeup, then unlock.
>   
>   Revision  Changes    Path
>   1.136     +1 -2      src/sys/dev/md/md.c
> 
>
> @@ -379,9 +379,8 @@
>  	bp->bio_bcount = bp->bio_length;
>  	mtx_lock(&sc->queue_mtx);
>  	bioq_disksort(&sc->bio_queue, bp);
> -	mtx_unlock(&sc->queue_mtx);
> -
>  	wakeup(sc);
> +	mtx_unlock(&sc->queue_mtx);
>  }

I think the original order is correct since you can occur 2 switches if 
you wakeup first and then unlock.

-Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4149EC27.9080200>