target: Fix delayed Task Aborted Status (TAS) handling bug
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Nov 2013 22:39:14 +0000 (14:39 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Nov 2013 22:53:28 +0000 (14:53 -0800)
commit29f4c090079f442ea2723d292e4e64f0b6ac1f27
tree17fb316f76bf3b47ae2a66513d7182564dd149e1
parent122f8afcfb3fa77d05e934182242933ac60746cb
target: Fix delayed Task Aborted Status (TAS) handling bug

This patch fixes a bug in delayed Task Aborted Status (TAS) handling,
where transport_send_task_abort() was not returning for the case
when the se_tfo->write_pending() callback indicated that last fabric
specific WRITE PDU had not yet been received.

It also adds an explicit cmd->scsi_status = SAM_STAT_TASK_ABORTED
assignment within transport_check_aborted_status() to avoid the case
where se_tfo->queue_status() is called when the SAM_STAT_TASK_ABORTED
assignment + ->queue_status() in transport_send_task_abort() does not
occur once SCF_SENT_DELAYED_TAS has been set.

Cc: <stable@vger.kernel.org> #3.2+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c