diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-02-05 06:37:52 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-02-05 06:37:52 +0100 |
commit | 12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6 (patch) | |
tree | b8fe38b24a2070d5b0cb2279f86e98b6dce98c46 /block | |
parent | Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes (diff) | |
parent | block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled (diff) | |
download | linux-12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6.tar.xz linux-12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6.zip |
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) 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; |