Patch from Vladimir Shveidel <vladimir.shveidel@xtremio.com> removing excessive msleep() in term exchange path

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4136 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-02-17 21:50:34 +00:00
parent 2d31b116b1
commit 9367254fba

View File

@@ -3097,10 +3097,9 @@ out_unlock:
spin_unlock_irqrestore(&pha->hardware_lock, flags);
if (do_tgt_cmd_done) {
if (!ha_locked && !in_interrupt()) {
msleep(250); /* just in case */
if (!ha_locked && !in_interrupt())
scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_DIRECT);
} else
else
scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_TASKLET);
/* !! At this point cmd could be already freed !! */
}
@@ -3175,10 +3174,9 @@ out_unlock:
spin_unlock_irqrestore(&pha->hardware_lock, flags);
if (do_tgt_cmd_done) {
if (!ha_locked && !in_interrupt()) {
msleep(250); /* just in case */
if (!ha_locked && !in_interrupt())
scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_DIRECT);
} else
else
scst_tgt_cmd_done(cmd->scst_cmd, SCST_CONTEXT_TASKLET);
/* !! At this point cmd could be already freed !! */
}