]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi-target: Remove SCF_SE_LUN_CMD flag abuses
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 9 Oct 2011 08:48:14 +0000 (01:48 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 24 Oct 2011 03:20:56 +0000 (03:20 +0000)
commit1ee54946524801e1ba9311ba4a39cb65f15fa26c
tree61f3a7a031433a7a31d5d38f7662f445d3441fa3
parentdb37010aced9a7427a200c97eb209b74b6cc9526
iscsi-target: Remove SCF_SE_LUN_CMD flag abuses

This patch removes a number of SCF_SE_LUN_CMD flag abuses within iscsi-target
code to determine when iscsit_release_cmd() or transport_generic_free_cmd()
should be called while releasing an individual iscsi_cmd descriptor.

In the place of SCF_SE_LUN_CMD checks, this patch converts existing code to
use a new iscsit_free_cmd() that inspects iscsi_cmd->iscsi_opcode types to
determine which of the above functions should be invoked.  It also removes the
now unnecessary special case checking in iscsit_release_commands_from_conn().

(hch: Use iscsit_free_cmd instead of open-coded alternative)

Reported-by: Christoph Hellwig <hch@lst.de>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_erl2.c
drivers/target/iscsi/iscsi_target_util.c
drivers/target/iscsi/iscsi_target_util.h