mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
Fix error recovery of internal commands
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4573,6 +4573,24 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
static void scst_prelim_finish_internal_cmd(struct scst_cmd *cmd)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
sBUG_ON(!cmd->internal);
|
||||
|
||||
spin_lock_irqsave(&cmd->sess->sess_list_lock, flags);
|
||||
list_del(&cmd->sess_cmd_list_entry);
|
||||
spin_unlock_irqrestore(&cmd->sess->sess_list_lock, flags);
|
||||
|
||||
__scst_cmd_put(cmd);
|
||||
|
||||
TRACE_EXIT();
|
||||
return;
|
||||
}
|
||||
|
||||
int scst_prepare_request_sense(struct scst_cmd *orig_cmd)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -4776,7 +4794,7 @@ out:
|
||||
return res;
|
||||
|
||||
out_free_cmd:
|
||||
__scst_cmd_put(cmd);
|
||||
scst_prelim_finish_internal_cmd(cmd);
|
||||
|
||||
out_busy:
|
||||
scst_set_busy(ws_cmd);
|
||||
|
||||
Reference in New Issue
Block a user