mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
scst: Remove scst_mgmt_cmd.scst_get_called
This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8016 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2627,7 +2627,6 @@ struct scst_mgmt_cmd {
|
||||
unsigned int needs_unblocking:1;
|
||||
unsigned int lun_set:1; /* set, if lun field is valid */
|
||||
unsigned int cmd_sn_set:1; /* set, if cmd_sn field is valid */
|
||||
unsigned int scst_get_called:1; /* set, if scst_get() was called */
|
||||
/* Set if dev handler's task_mgmt_fn_received was called */
|
||||
unsigned int task_mgmt_fn_received_called:1;
|
||||
unsigned int mcmd_dropped:1; /* set if mcmd was dropped */
|
||||
|
||||
@@ -7338,11 +7338,10 @@ static void scst_destroy_cmd(struct scst_cmd *cmd)
|
||||
|
||||
scst_sess_put(cmd->sess);
|
||||
|
||||
/*
|
||||
* At this point tgt_dev can be dead, but the pointer remains non-NULL
|
||||
*/
|
||||
if (likely(cmd->tgt_dev != NULL))
|
||||
if (likely(cmd->cpu_cmd_counter)) {
|
||||
scst_put(cmd->cpu_cmd_counter);
|
||||
cmd->cpu_cmd_counter = NULL;
|
||||
}
|
||||
|
||||
EXTRACHECKS_BUG_ON(cmd->pre_alloced && cmd->internal);
|
||||
|
||||
@@ -7582,8 +7581,10 @@ void scst_free_mgmt_cmd(struct scst_mgmt_cmd *mcmd)
|
||||
|
||||
scst_sess_put(mcmd->sess);
|
||||
|
||||
if ((mcmd->mcmd_tgt_dev != NULL) || mcmd->scst_get_called)
|
||||
if (mcmd->cpu_cmd_counter) {
|
||||
scst_put(mcmd->cpu_cmd_counter);
|
||||
mcmd->cpu_cmd_counter = NULL;
|
||||
}
|
||||
|
||||
mempool_free(mcmd, scst_mgmt_mempool);
|
||||
|
||||
|
||||
@@ -5023,9 +5023,11 @@ static int scst_translate_lun(struct scst_cmd *cmd)
|
||||
scst_event_queue_lun_not_found(cmd);
|
||||
}
|
||||
scst_put(cmd->cpu_cmd_counter);
|
||||
cmd->cpu_cmd_counter = NULL;
|
||||
}
|
||||
} else {
|
||||
scst_put(cmd->cpu_cmd_counter);
|
||||
cmd->cpu_cmd_counter = NULL;
|
||||
TRACE_MGMT_DBG("%s", "FLAG SUSPENDED set, skipping");
|
||||
res = 1;
|
||||
}
|
||||
@@ -5831,6 +5833,7 @@ static int scst_get_mgmt(struct scst_mgmt_cmd *mcmd)
|
||||
if (unlikely(test_bit(SCST_FLAG_SUSPENDED, &scst_flags) &&
|
||||
!test_bit(SCST_FLAG_SUSPENDING, &scst_flags))) {
|
||||
scst_put(mcmd->cpu_cmd_counter);
|
||||
mcmd->cpu_cmd_counter = NULL;
|
||||
TRACE_MGMT_DBG("%s", "FLAG SUSPENDED set, skipping");
|
||||
res = 1;
|
||||
goto out;
|
||||
@@ -5870,6 +5873,7 @@ static int scst_mgmt_translate_lun(struct scst_mgmt_cmd *mcmd)
|
||||
res = 0;
|
||||
} else {
|
||||
scst_put(mcmd->cpu_cmd_counter);
|
||||
mcmd->cpu_cmd_counter = NULL;
|
||||
res = -1;
|
||||
}
|
||||
|
||||
@@ -6718,7 +6722,6 @@ static int scst_mgmt_cmd_init(struct scst_mgmt_cmd *mcmd)
|
||||
rc = scst_get_mgmt(mcmd);
|
||||
if (rc == 0) {
|
||||
mcmd->state = SCST_MCMD_STATE_EXEC;
|
||||
mcmd->scst_get_called = 1;
|
||||
} else {
|
||||
EXTRACHECKS_BUG_ON(rc < 0);
|
||||
res = rc;
|
||||
|
||||
Reference in New Issue
Block a user