diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-02-13 04:07:22 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-02-25 17:37:49 -0500 |
commit | 86715569d085addc635c2b55ee8acb79d3a7fbbf (patch) | |
tree | b6b6d554b329a86845d8de661529c3fc2bc6dbef /drivers | |
parent | 2fbff1276bb635294b3384b6c167f72d0acdab95 (diff) |
target: Add SCF_ACK_KREF flag for acknowledgement kref
When TARGET_SCF_ACK_KREF is in use with target_submit_cmd() for
setting the extra acknowledgement reference to se_cmd->cmd_kref,
go ahead and set SCF_ACK_KREF in order to be used later by
abort task.
Reported-by: Roland Dreier <roland@purestorage.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/target_core_transport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 35bae7dd670a..c6b8b8233399 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -4030,8 +4030,10 @@ void target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd, | |||
4030 | * fabric acknowledgement that requires two target_put_sess_cmd() | 4030 | * fabric acknowledgement that requires two target_put_sess_cmd() |
4031 | * invocations before se_cmd descriptor release. | 4031 | * invocations before se_cmd descriptor release. |
4032 | */ | 4032 | */ |
4033 | if (ack_kref == true) | 4033 | if (ack_kref == true) { |
4034 | kref_get(&se_cmd->cmd_kref); | 4034 | kref_get(&se_cmd->cmd_kref); |
4035 | se_cmd->se_cmd_flags |= SCF_ACK_KREF; | ||
4036 | } | ||
4035 | 4037 | ||
4036 | spin_lock_irqsave(&se_sess->sess_cmd_lock, flags); | 4038 | spin_lock_irqsave(&se_sess->sess_cmd_lock, flags); |
4037 | list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); | 4039 | list_add_tail(&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); |