target: Inline transport_put_cmd()
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 31 Oct 2017 18:03:11 +0000 (11:03 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 4 Nov 2017 22:15:41 +0000 (15:15 -0700)
commitc01706982350224a6c3653ca5b6f24f37dbbecad
tree96b84c3f6803a440e66e2da13cac50257258770a
parentd7e595ddd5b243aa9ba1948d5e0a37783b5415af
target: Inline transport_put_cmd()

Since all transput_put_cmd() does is to call target_put_sess_cmd(),
inline transport_put_cmd() into its callers. Leave out the BUG_ON()
statement because if cmd->se_tfo == NULL then cmd->cmd_kref is 0
and kref_put() will complain anyway. Notes:
- transport_init_se_cmd() initializes both .se_tfo and .cmd_kref.
- The only target driver that does not call transport_init_se_cmd()
  for all commands is the iSCSI target driver. See also
  iscsi_target_rx_opcode().

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Mike Christie <mchristi@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c