Commit b2d37f61 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] UMEM: disable irq when calling plugging functions.

blk_plug_device and blk_remove_plug want irqs_disabled,
so we give it to them.
parent d3351f49
...@@ -371,11 +371,12 @@ static void mm_unplug_device(void *data) ...@@ -371,11 +371,12 @@ static void mm_unplug_device(void *data)
{ {
request_queue_t *q = data; request_queue_t *q = data;
struct cardinfo *card = q->queuedata; struct cardinfo *card = q->queuedata;
unsigned long flags;
spin_lock_bh(&card->lock); spin_lock_irqsave(&card->lock, flags);
if (blk_remove_plug(q)) if (blk_remove_plug(q))
activate(card); activate(card);
spin_unlock_bh(&card->lock); spin_unlock_irqrestore(&card->lock, flags);
} }
/* /*
...@@ -557,12 +558,12 @@ static int mm_make_request(request_queue_t *q, struct bio *bio) ...@@ -557,12 +558,12 @@ static int mm_make_request(request_queue_t *q, struct bio *bio)
PRINTK("mm_make_request %ld %d\n", bh->b_rsector, bh->b_size); PRINTK("mm_make_request %ld %d\n", bh->b_rsector, bh->b_size);
bio->bi_phys_segments = bio->bi_idx; /* count of completed segments*/ bio->bi_phys_segments = bio->bi_idx; /* count of completed segments*/
spin_lock_bh(&card->lock); spin_lock_irq(&card->lock);
*card->biotail = bio; *card->biotail = bio;
bio->bi_next = NULL; bio->bi_next = NULL;
card->biotail = &bio->bi_next; card->biotail = &bio->bi_next;
blk_plug_device(q); blk_plug_device(q);
spin_unlock_bh(&card->lock); spin_unlock_irq(&card->lock);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment