isert-scst: Fix isert conn tx_free_list resources leak

The get and put of resources from the tx_free commands pool was not
symmetric. Commands that are self issued by the target (e.g. nop outs)
didn't release their resources, although they acquired them earlier.

Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Alex Lyakas <alex@zadarastorage.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6630 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-11-09 19:19:41 +00:00
parent ceee6fc7e1
commit 8a09beb37d
2 changed files with 3 additions and 3 deletions

View File

@@ -168,8 +168,7 @@ void isert_release_rx_pdu(struct iscsi_cmnd *iscsi_pdu)
{
struct isert_cmnd *isert_pdu = (struct isert_cmnd *)iscsi_pdu;
if (likely(!isert_pdu->is_fake_rx))
isert_rx_pdu_done(isert_pdu);
isert_rx_pdu_done(isert_pdu);
}
/* if last transition into FF (Fully Featured) state */

View File

@@ -46,6 +46,7 @@
#endif
#include "isert_dbg.h"
#include "isert.h"
#include "iser.h"
#include "iser_datamover.h"
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
@@ -211,7 +212,7 @@ static void isert_cmnd_free(struct iscsi_cmnd *cmnd)
sBUG();
}
#endif
if (cmnd->parent_req)
if (cmnd->parent_req || ((struct isert_cmnd *)cmnd)->is_fake_rx)
isert_release_tx_pdu(cmnd);
else
isert_release_rx_pdu(cmnd);