|
@@ -8111,6 +8111,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
|
|
u64 *p;
|
|
|
int lo, hi;
|
|
|
int rv = 1;
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
if (bb->shift < 0)
|
|
|
/* badblocks are disabled */
|
|
@@ -8125,7 +8126,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
|
|
sectors = next - s;
|
|
|
}
|
|
|
|
|
|
- write_seqlock_irq(&bb->lock);
|
|
|
+ write_seqlock_irqsave(&bb->lock, flags);
|
|
|
|
|
|
p = bb->page;
|
|
|
lo = 0;
|
|
@@ -8241,7 +8242,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
|
|
bb->changed = 1;
|
|
|
if (!acknowledged)
|
|
|
bb->unacked_exist = 1;
|
|
|
- write_sequnlock_irq(&bb->lock);
|
|
|
+ write_sequnlock_irqrestore(&bb->lock, flags);
|
|
|
|
|
|
return rv;
|
|
|
}
|