2000-11-08 00:46:04

by Gary E. Miller

[permalink] [raw]
Subject: [PATCH] deadlock fix

Yo All!

I see this patch did not make it into test11-pre1. Without it
raid1 and SMP do not work together. Please consider for test11-pre2.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 20340 Empire Ave, Suite E-3, Bend, OR 97701
[email protected] Tel:+1(541)382-8588 Fax: +1(541)382-8676

> > > Here it is.
> > >
> > > --- drivers/md/raid1.c.org Wed Oct 18 15:30:07 2000
> > > +++ drivers/md/raid1.c Wed Oct 18 15:33:08 2000
> > > @@ -91,7 +91,8 @@
> > >
> > > static inline void raid1_free_bh(raid1_conf_t *conf, struct buffer_head *bh)
> > > {
> > > - md_spin_lock_irq(&conf->device_lock);
> > > + unsigned long flags;
> > > + md_spin_lock_irqsave(&conf->device_lock, flags);
> > > while (bh) {
> > > struct buffer_head *t = bh;
> > > bh=bh->b_next;
> > > @@ -103,7 +104,7 @@
> > > conf->freebh_cnt++;
> > > }
> > > }
> > > - md_spin_unlock_irq(&conf->device_lock);
> > > + md_spin_unlock_irqrestore(&conf->device_lock, flags);
> > > wake_up(&conf->wait_buffer);
> > > }
>



2000-11-08 04:39:39

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] deadlock fix



On Tue, 7 Nov 2000, Gary E. Miller wrote:
>
> I see this patch did not make it into test11-pre1. Without it
> raid1 and SMP do not work together. Please consider for test11-pre2.

You must have a different test11-pre1 than the one I have.

It's already there in -pre1, as far as I can see.

Linus