diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-02-05 00:37:52 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-02-05 00:37:52 -0500 |
commit | 12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6 (patch) | |
tree | b8fe38b24a2070d5b0cb2279f86e98b6dce98c46 /block | |
parent | 6344a5cd3e8acf6e9823046cebd00b16faacdb1a (diff) | |
parent | 0fb5b1fb30fba3671dd5b1489d78e93e08d62e4e (diff) |
Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index ab51685988c2..b83d29755b5a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -2455,14 +2455,16 @@ struct request *blk_peek_request(struct request_queue *q) | |||
2455 | 2455 | ||
2456 | rq = NULL; | 2456 | rq = NULL; |
2457 | break; | 2457 | break; |
2458 | } else if (ret == BLKPREP_KILL) { | 2458 | } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID) { |
2459 | int err = (ret == BLKPREP_INVALID) ? -EREMOTEIO : -EIO; | ||
2460 | |||
2459 | rq->cmd_flags |= REQ_QUIET; | 2461 | rq->cmd_flags |= REQ_QUIET; |
2460 | /* | 2462 | /* |
2461 | * Mark this request as started so we don't trigger | 2463 | * Mark this request as started so we don't trigger |
2462 | * any debug logic in the end I/O path. | 2464 | * any debug logic in the end I/O path. |
2463 | */ | 2465 | */ |
2464 | blk_start_request(rq); | 2466 | blk_start_request(rq); |
2465 | __blk_end_request_all(rq, -EIO); | 2467 | __blk_end_request_all(rq, err); |
2466 | } else { | 2468 | } else { |
2467 | printk(KERN_ERR "%s: bad return=%d\n", __func__, ret); | 2469 | printk(KERN_ERR "%s: bad return=%d\n", __func__, ret); |
2468 | break; | 2470 | break; |