Message ID | 20171004135511.26110-10-rgoldwyn@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 11f273d2f018..d714c1b1b066 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -542,6 +542,11 @@ static int __multipath_map_bio(struct multipath *m, struct bio *bio, struct dm_m if ((pgpath && queue_io) || (!pgpath && test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags))) { + /* Bail if nowait is set */ + if (bio->bi_opf & REQ_NOWAIT) { + bio_wouldblock_error(bio); + return DM_MAPIO_SUBMITTED; + } /* Queue for the daemon to resubmit */ spin_lock_irqsave(&m->lock, flags); bio_list_add(&m->queued_bios, bio);