summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2016-02-05 08:37:52 +0300
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2016-02-05 08:37:52 +0300
commit12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6 (patch)
treeb8fe38b24a2070d5b0cb2279f86e98b6dce98c46 /block
parent6344a5cd3e8acf6e9823046cebd00b16faacdb1a (diff)
parent0fb5b1fb30fba3671dd5b1489d78e93e08d62e4e (diff)
downloadlinux-12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6.tar.xz
Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c6
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)
rq = NULL;
break;
- } else if (ret == BLKPREP_KILL) {
+ } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID) {
+ int err = (ret == BLKPREP_INVALID) ? -EREMOTEIO : -EIO;
+
rq->cmd_flags |= REQ_QUIET;
/*
* Mark this request as started so we don't trigger
* any debug logic in the end I/O path.
*/
blk_start_request(rq);
- __blk_end_request_all(rq, -EIO);
+ __blk_end_request_all(rq, err);
} else {
printk(KERN_ERR "%s: bad return=%d\n", __func__, ret);
break;