diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
commit | 4958134df54c2c84e9c22ea042761d439164d26e (patch) | |
tree | 503177afab11f7d25b12a84ce25b481d305c51ba /drivers/scsi/scsi_lib.c | |
parent | c4f528795d1add8b63652673f7262729f679c6c1 (diff) | |
parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) |
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index a86df9ca7d1c..c84f931388f2 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -671,6 +671,7 @@ static bool scsi_end_request(struct request *req, blk_status_t error, | |||
671 | if (!blk_rq_is_scsi(req)) { | 671 | if (!blk_rq_is_scsi(req)) { |
672 | WARN_ON_ONCE(!(cmd->flags & SCMD_INITIALIZED)); | 672 | WARN_ON_ONCE(!(cmd->flags & SCMD_INITIALIZED)); |
673 | cmd->flags &= ~SCMD_INITIALIZED; | 673 | cmd->flags &= ~SCMD_INITIALIZED; |
674 | destroy_rcu_head(&cmd->rcu); | ||
674 | } | 675 | } |
675 | 676 | ||
676 | if (req->mq_ctx) { | 677 | if (req->mq_ctx) { |
@@ -720,6 +721,8 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd, | |||
720 | int result) | 721 | int result) |
721 | { | 722 | { |
722 | switch (host_byte(result)) { | 723 | switch (host_byte(result)) { |
724 | case DID_OK: | ||
725 | return BLK_STS_OK; | ||
723 | case DID_TRANSPORT_FAILFAST: | 726 | case DID_TRANSPORT_FAILFAST: |
724 | return BLK_STS_TRANSPORT; | 727 | return BLK_STS_TRANSPORT; |
725 | case DID_TARGET_FAILURE: | 728 | case DID_TARGET_FAILURE: |
@@ -1151,6 +1154,7 @@ static void scsi_initialize_rq(struct request *rq) | |||
1151 | struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); | 1154 | struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); |
1152 | 1155 | ||
1153 | scsi_req_init(&cmd->req); | 1156 | scsi_req_init(&cmd->req); |
1157 | init_rcu_head(&cmd->rcu); | ||
1154 | cmd->jiffies_at_alloc = jiffies; | 1158 | cmd->jiffies_at_alloc = jiffies; |
1155 | cmd->retries = 0; | 1159 | cmd->retries = 0; |
1156 | } | 1160 | } |