diff options
author | Alex Shi <alex.shi@linaro.org> | 2014-02-27 09:12:39 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2014-02-27 09:12:39 +0800 |
commit | 0a92210a812d913cfb99cb959ec75f27473af664 (patch) | |
tree | 76c3acbdae4c61e0828701f36445eb287314a721 /block | |
parent | 04eec8da27b98e3f8c370661a6b1e81c63950134 (diff) | |
parent | 61dde96f97bb5b1ed4c11caf9a857d55ad8f6e17 (diff) |
Merge tag 'v3.10.32' into linux-linaro-lsk
This is the 3.10.32 stable release
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-lib.c | 8 | ||||
-rw-r--r-- | block/blk.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c index d6f50d57256..9a32f5868fb 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -121,6 +121,14 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector, atomic_inc(&bb.done); submit_bio(type, bio); + + /* + * We can loop for a long time in here, if someone does + * full device discards (like mkfs). Be nice and allow + * us to schedule out to avoid softlocking if preempt + * is disabled. + */ + cond_resched(); } blk_finish_plug(&plug); diff --git a/block/blk.h b/block/blk.h index e837b8f619b..b3bdeb36f36 100644 --- a/block/blk.h +++ b/block/blk.h @@ -96,7 +96,7 @@ static inline struct request *__elv_next_request(struct request_queue *q) q->flush_queue_delayed = 1; return NULL; } - if (unlikely(blk_queue_dying(q)) || + if (unlikely(blk_queue_bypass(q)) || !q->elevator->type->ops.elevator_dispatch_fn(q, 0)) return NULL; } |