Skip to content

Commit

Permalink
target: Remove legacy device status check from transport_execute_tasks
Browse files Browse the repository at this point in the history
This patch removes a legacy se_dev_check_online() check from within
transport_execute_tasks() that should no longer be necessary as
transport_lookup_cmd_lun() is already making this call.

Using transport_cmd_check_stop() from transport_execute_tasks() should
already be checking per se_cmd context for each descriptor upon active
I/O shutdown, so no need to acquire dev->dev_status_lock again while
executing se_task submission.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@purestorage.com>
Cc: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Dec 14, 2011
1 parent beb55a0 commit 6d5b597
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2062,13 +2062,6 @@ static int transport_execute_tasks(struct se_cmd *cmd)
{
int add_tasks;
struct se_device *se_dev = cmd->se_dev;

if (se_dev_check_online(cmd->se_dev) != 0) {
cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
transport_generic_request_failure(cmd);
return 0;
}

/*
* Call transport_cmd_check_stop() to see if a fabric exception
* has occurred that prevents execution.
Expand Down

0 comments on commit 6d5b597

Please sign in to comment.