]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
target/iscsi: Simplify iscsit_free_cmd()
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 23 May 2017 23:48:44 +0000 (16:48 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 7 Jul 2017 06:11:27 +0000 (23:11 -0700)
commitd1c26857cdec3e3bdb5cf7179411f6ce8cc0834c
treec82cb87bd5f15a840095adff694f09fc6637a6c2
parent4412a67131a037fa1d032bcd50270e9d336a775d
target/iscsi: Simplify iscsit_free_cmd()

Since .se_tfo is only set if a command has been submitted to
the LIO core, check .se_tfo instead of .iscsi_opcode. Since
__iscsit_free_cmd() only affects SCSI commands but not TMFs,
calling that function for TMFs does not change behavior. This
patch does not change the behavior of iscsit_free_cmd().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: David Disseldorp <ddiss@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_util.c