iscsi-target: Only perform wait_for_tasks when performing shutdown
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 3 Oct 2013 20:37:21 +0000 (13:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2013 01:14:31 +0000 (18:14 -0700)
commit67c90f9d826e5cee09d3dcb4554462f0ba6df38e
tree433ed5cd25fe373bb67bda71524509e1284f059d
parent126f292a117cf69989c0d17169abfdd715619c7b
iscsi-target: Only perform wait_for_tasks when performing shutdown

commit e255a28598e8e63070322fc89bd34189dd660a89 upstream.

This patch changes transport_generic_free_cmd() to only wait_for_tasks
when shutdown=true is passed to iscsit_free_cmd().

With the advent of >= v3.10 iscsi-target code using se_cmd->cmd_kref,
the extra wait_for_tasks with shutdown=false is unnecessary, and may
end up causing an extra context switch when releasing WRITEs.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/iscsi_target_util.c