提交 cd529a46 编写于 作者: M Mike Christie 提交者: James Bottomley

[SCSI] libiscsi: fix missed iscsi_task_put in xmit error path

from bhalevy@gmail.com:

It looks like change 652 to libiscsi.c added some dead code around line
670
                if (rc) {
                        spin_unlock_bh(&conn->session->lock);
                        goto again;
                }

since 5 lines above we goto again if (rc).

It looks like the previous if (rc) should go away if we want to put the
ctask before
breaking out of the while loop with "goto again" (see following patch).
Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 98644047
......@@ -661,8 +661,6 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
spin_unlock_bh(&conn->session->lock);
rc = tt->xmit_cmd_task(conn, conn->ctask);
if (rc)
goto again;
spin_lock_bh(&conn->session->lock);
__iscsi_put_ctask(conn->ctask);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册