mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
Revert "scsi: target/iscsi: Reduce number of __iscsit_free_cmd() callers"
The cxgbit driver expects that __iscsit_free_cmd() is called before the
target core frees the command page list. Since this patch breaks the
cxgbit driver, revert it.
Reported-by: Varun Prakash <[email protected]>
Fixes: ed88f05578 ("scsi: target/iscsi: Reduce number of __iscsit_free_cmd() callers")
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Varun Prakash <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Reviewed-by: Mike Christie <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
1 parent
0e0d752671
commit
c8a75afbf7
3 files changed
+5
-2
No files matched your search
@@ -497,6 +497,8 @@ void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
|
||||
!(cmd->se_cmd.transport_state & CMD_T_FABRIC_STOP))
|
||||
list_del_init(&cmd->i_conn_node);
|
||||
spin_unlock_bh(&conn->cmd_lock);
|
||||
|
||||
__iscsit_free_cmd(cmd, true);
|
||||
}
|
||||
EXPORT_SYMBOL(iscsit_aborted_task);
|
||||
|
||||
|
||||
@@ -1544,7 +1544,6 @@ static void lio_release_cmd(struct se_cmd *se_cmd)
|
||||
struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
|
||||
|
||||
pr_debug("Entering lio_release_cmd for se_cmd: %p\n", se_cmd);
|
||||
__iscsit_free_cmd(cmd, true);
|
||||
iscsit_release_cmd(cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -772,8 +772,10 @@ void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown)
|
||||
__iscsit_free_cmd(cmd, shutdown);
|
||||
if (se_cmd) {
|
||||
rc = transport_generic_free_cmd(se_cmd, shutdown);
|
||||
if (!rc && shutdown && se_cmd->se_sess)
|
||||
if (!rc && shutdown && se_cmd->se_sess) {
|
||||
__iscsit_free_cmd(cmd, shutdown);
|
||||
target_put_sess_cmd(se_cmd);
|
||||
}
|
||||
} else {
|
||||
iscsit_release_cmd(cmd);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user