summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-12-21 14:13:47 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2012-02-25 14:37:45 -0800
commit7d680f3b74dd6f0f57569eeeee8c257790ceaa96 (patch)
treee0797ab722c222213b7cbe4fa9ba4a61db2d8b0c /drivers/target/iscsi/iscsi_target.c
parentb01543dfe67bb1d191998e90d20534dc354de059 (diff)
downloadop-kernel-dev-7d680f3b74dd6f0f57569eeeee8c257790ceaa96.zip
op-kernel-dev-7d680f3b74dd6f0f57569eeeee8c257790ceaa96.tar.gz
target: replace various cmd flags with a transport state
Replace various atomic_ts used as flags in struct se_cmd with a single transport_state bitmap that requires t_state_lock to be held for modifications. In the target core that assumption generally is true, but some recently added code in the SRP target had to grow new lock calls. I can't say I like the way how it messes with the command state directly, but let's leave that for later. (Re-add missing ib_srpt.c changes that nab dropped..) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target.c')
-rw-r--r--drivers/target/iscsi/iscsi_target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 4426290..bf0e8e7 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1363,7 +1363,7 @@ static int iscsit_handle_data_out(struct iscsi_conn *conn, unsigned char *buf)
* outstanding_r2ts reaches zero, go ahead and send the delayed
* TASK_ABORTED status.
*/
- if (atomic_read(&se_cmd->t_transport_aborted) != 0) {
+ if (se_cmd->transport_state & CMD_T_ABORTED) {
if (hdr->flags & ISCSI_FLAG_CMD_FINAL)
if (--cmd->outstanding_r2ts < 1) {
iscsit_stop_dataout_timer(cmd);
OpenPOWER on IntegriCloud