mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
scst: Make extra_tgt_dev_list_entry users hold scst_mutex
Because it's used in 3 places not othrewise synchronized Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2528,7 +2528,7 @@ struct scst_tgt_dev {
|
||||
/* List entry in dev->dev_tgt_dev_list */
|
||||
struct list_head dev_tgt_dev_list_entry;
|
||||
|
||||
/* Internal tmp list entry */
|
||||
/* Internal tmp list entry. User must hold scst_mutex. */
|
||||
struct list_head extra_tgt_dev_list_entry;
|
||||
|
||||
/* Set if INQUIRY DATA HAS CHANGED UA is needed */
|
||||
|
||||
@@ -5212,8 +5212,6 @@ static int scst_clear_task_set(struct scst_mgmt_cmd *mcmd)
|
||||
|
||||
scst_unblock_aborted_cmds(1);
|
||||
|
||||
mutex_unlock(&scst_mutex);
|
||||
|
||||
if (!dev->tas) {
|
||||
uint8_t sense_buffer[SCST_STANDARD_SENSE_LEN];
|
||||
int sl;
|
||||
@@ -5228,6 +5226,8 @@ static int scst_clear_task_set(struct scst_mgmt_cmd *mcmd)
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&scst_mutex);
|
||||
|
||||
scst_call_dev_task_mgmt_fn_received(mcmd, mcmd->mcmd_tgt_dev);
|
||||
|
||||
res = scst_set_mcmd_next_state(mcmd);
|
||||
|
||||
Reference in New Issue
Block a user