diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-08-20 21:26:04 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-20 21:26:04 +0200 |
commit | f0b433e9f362e0b7f0ce7d1489dd7feba068605d (patch) | |
tree | d4bfd9489cf4a96a55d83af20919f477a846d585 /drivers/block/umem.c | |
parent | fa2f5bf09610d3c216d4c74855edbe00d636467c (diff) | |
parent | 28c42c28309244d0b15d1b385e33429d59997679 (diff) |
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Additional updates for 3.6
A batch more bugfixes, all driver-specific and fairly small and
unremarkable in a global context. The biggest batch are for the newly
added Arizona drivers.
Diffstat (limited to 'drivers/block/umem.c')
-rw-r--r-- | drivers/block/umem.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index aa2712060bf..eb0d8216f55 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -513,6 +513,21 @@ static void process_page(unsigned long data) } } +static void mm_unplug(struct blk_plug_cb *cb, bool from_schedule) +{ + struct cardinfo *card = cb->data; + + spin_lock_irq(&card->lock); + activate(card); + spin_unlock_irq(&card->lock); + kfree(cb); +} + +static int mm_check_plugged(struct cardinfo *card) +{ + return !!blk_check_plugged(mm_unplug, card, sizeof(struct blk_plug_cb)); +} + static void mm_make_request(struct request_queue *q, struct bio *bio) { struct cardinfo *card = q->queuedata; @@ -523,6 +538,8 @@ static void mm_make_request(struct request_queue *q, struct bio *bio) *card->biotail = bio; bio->bi_next = NULL; card->biotail = &bio->bi_next; + if (bio->bi_rw & REQ_SYNC || !mm_check_plugged(card)) + activate(card); spin_unlock_irq(&card->lock); return; |