Don't call target drivers on_free_cmd() for internal commands

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1201 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-10-12 11:47:44 +00:00
parent 149cc3e8a1
commit d3393e2293
+1 -1
View File
@@ -2507,7 +2507,7 @@ void scst_free_cmd(struct scst_cmd *cmd)
if (!cmd->tgt_data_buf_alloced)
scst_check_restore_sg_buff(cmd);
if (cmd->tgtt->on_free_cmd != NULL) {
if ((cmd->tgtt->on_free_cmd != NULL) && likely(!cmd->internal)) {
TRACE_DBG("Calling target's on_free_cmd(%p)", cmd);
scst_set_cur_start(cmd);
cmd->tgtt->on_free_cmd(cmd);