Re: biodone panics

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 29 Sep 2005 13:03:39 -0400
On Thursday 29 September 2005 03:17 am, Alex Lyashkov wrote:
> > > biodone(struct bio *bp)
> > > {
> > >         void (*done)(struct bio *);
> > >
> > >         mtx_lock(&bdonelock);
> > >         bp->bio_flags |= BIO_DONE;
> > >         done = bp->bio_done
> > >         if (done == NULL)
> > >                 wakeup(bp);
> > >         mtx_unlock(&bdonelock);
> > >         if (done != NULL)
> > >                 bp->bio_done(bp);
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> posible it should be
> if(done != NULL)
> 	done(bp);
> ?

Note that since he only does the wakeup of done is NULL, so I think it's ok as 
is.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Thu Sep 29 2005 - 16:07:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC