Просмотр исходного кода

target: Fix bidi command handling

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>
Bart Van Assche 10 лет назад
Родитель
Сommit
63509c60bb
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      drivers/target/target_core_transport.c

+ 1 - 2
drivers/target/target_core_transport.c

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