iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err
iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err

This patch fixes a bug where outstanding RDMA_READs with WRITE_PENDING
status require an extra target_put_sess_cmd() in isert_put_cmd() code
when called from isert_cq_tx_comp_err() + isert_cq_drain_comp_llist()
context during session shutdown.

The extra kref PUT is required so that transport_generic_free_cmd()
invokes the last target_put_sess_cmd() -> target_release_cmd_kref(),
which will complete(&se_cmd->cmd_wait_comp) the outstanding se_cmd
descriptor with WRITE_PENDING status, and awake the completion in
target_wait_for_sess_cmds() to invoke TFO->release_cmd().

The bug was manifesting itself in target_wait_for_sess_cmds() where
a se_cmd descriptor with WRITE_PENDING status would end up sleeping
indefinately.

Acked-by: Sagi Grimberg <380ce2a82d3d08e67ab163b51dc6d30288ad3f13@mellanox.com>
Cc: Or Gerlitz <de1b678a59344538ef9f2ddb34a5f9486544e2f9@mellanox.com>
Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org> #3.10+
Signed-off-by: Nicholas Bellinger <978acd1567d5598152161fdf8bf3ca568f950c9b@linux-iscsi.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs