> +static bool __target_check_io_state(struct se_cmd *se_cmd)
> +{
> +     struct se_session *sess = se_cmd->se_sess;
> +
> +     assert_spin_locked(&se_session->sess_cmd_lock);
> +     WARN_ON_ONCE(!irqs_disabled());

Btw, I looked a the code and can't really see what sess_cmd_lock is
supposed to protect here.

> +             sess = cmd->se_sess;
> +             if (WARN_ON_ONCE(!sess))
> +                     continue;
> +
> +             spin_lock(&sess->sess_cmd_lock);
> +             rc = __target_check_io_state(cmd);
> +             spin_unlock(&sess->sess_cmd_lock);
> +             if (!rc) {
> +                     printk("LUN_RESET I/O: non-zero 
> kref_get_unless_zero\n");
> +                     continue;
> +             }

And thus why we care about taking it here.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to