return;
}
+/* No locks, no IRQ or IRQ-disabled context allowed */
int scst_set_pending_UA(struct scst_cmd *cmd)
{
int res = 0, i;
spin_unlock_bh(&cmd->tgt_dev->tgt_dev_lock);
- mutex_lock(&scst_mutex);
+ /*
+ * cmd won't allow to suspend activities, so we can access
+ * sess->sess_tgt_dev_list_hash without any additional
+ * protection.
+ */
+
local_bh_disable();
for (i = 0; i < TGT_DEV_HASH_SIZE; i++) {
}
local_bh_enable();
- mutex_unlock(&scst_mutex);
-
spin_lock_bh(&cmd->tgt_dev->tgt_dev_lock);
}
memset(buffer, 0, buffer_size);
offs = 8;
- /* sess->sess_tgt_dev_list_hash is protected by suspended activity */
+ /*
+ * cmd won't allow to suspend activities, so we can access
+ * sess->sess_tgt_dev_list_hash without any additional protection.
+ */
for (i = 0; i < TGT_DEV_HASH_SIZE; i++) {
struct list_head *sess_tgt_dev_list_head =
&cmd->sess->sess_tgt_dev_list_hash[i];
/* Clear left sense_reported_luns_data_changed UA, if any. */
- mutex_lock(&scst_mutex); /* protect sess_tgt_dev_list_hash */
+ /*
+ * cmd won't allow to suspend activities, so we can access
+ * sess->sess_tgt_dev_list_hash without any additional protection.
+ */
for (i = 0; i < TGT_DEV_HASH_SIZE; i++) {
struct list_head *sess_tgt_dev_list_head =
&cmd->sess->sess_tgt_dev_list_hash[i];
spin_unlock_bh(&tgt_dev->tgt_dev_lock);
}
}
- mutex_unlock(&scst_mutex);
out_done:
/* Report the result */
goto out;
}
-/* No locks, no IRQ or IRQ-safe context allowed */
+/* No locks, no IRQ or IRQ-disabled context allowed */
int scst_check_local_events(struct scst_cmd *cmd)
{
int res, rc;