]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] be2iscsi: Fix for freeing cid
authorJayamohan Kallickal <jayamohank@serverengines.com>
Wed, 21 Jul 2010 22:52:27 +0000 (04:22 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 28 Jul 2010 14:05:31 +0000 (09:05 -0500)
This patch frees up the allocated cid and returns error if allocation
of tag fails.

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_iscsi.c

index 4f3c2a4079df8adf0c4105e1231b7d4032ea2a37..de79b7cf804d1a3ba661629e17d7fc6e910f00fe 100644 (file)
@@ -509,6 +509,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
                SE_DEBUG(DBG_LVL_1,
                         "mgmt_open_connection Failed for cid=%d\n",
                         beiscsi_ep->ep_cid);
+               beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
+               return -EAGAIN;
        } else {
                wait_event_interruptible(phba->ctrl.mcc_wait[tag],
                                         phba->ctrl.mcc_numtag[tag]);