lkml.org 
[lkml]   [2020]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING in md_ioctl
> > > diff --git i/drivers/md/md.c w/drivers/md/md.c
> > > index 6072782070230..49442a3f4605b 100644
> > > --- i/drivers/md/md.c
> > > +++ w/drivers/md/md.c
> > > @@ -7591,8 +7591,10 @@ static int md_ioctl(struct block_device *bdev,
> > > fmode_t mode,
> > > err = -EBUSY;
> > > goto out;
> > > }
> > > - WARN_ON_ONCE(test_bit(MD_CLOSING, &mddev->flags));
> > > - set_bit(MD_CLOSING, &mddev->flags);
> > > + if (test_and_set_bit(MD_CLOSING, &mddev->flags)) {
> > > + err = -EBUSY;
> > > + goto out;
> > > + }
> > > did_set_md_closing = true;
> > > mutex_unlock(&mddev->open_mutex);
> > > sync_blockdev(bdev);
> > >
>
> Good catch! The fix looks good. Would you like to submit a patch for it?

Sure. I will send a patch soon.

Best regards,
Dae R. Jeong.


\
 
 \ /
  Last update: 2020-10-22 02:26    [W:0.050 / U:11.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site