target: Fix bidi command handling
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 13 May 2015 07:17:54 +0000 (09:17 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 15 May 2015 04:13:31 +0000 (21:13 -0700)
The function transport_complete_qf() must call either
queue_data_in() or queue_status() but not both.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c

index 3fe5cb240b6f6a5b4c8a3fb42396b77dd5701f74..99a38cf320ff27ec64d5b28b765e34e434e6b6e7 100644 (file)
@@ -1957,8 +1957,7 @@ static void transport_complete_qf(struct se_cmd *cmd)
        case DMA_TO_DEVICE:
                if (cmd->se_cmd_flags & SCF_BIDI) {
                        ret = cmd->se_tfo->queue_data_in(cmd);
-                       if (ret < 0)
-                               break;
+                       break;
                }
                /* Fall through for DMA_TO_DEVICE */
        case DMA_NONE: