public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/9] iscsi update: setup pool before using
@ 2006-02-02  3:06 Mike Christie
  0 siblings, 0 replies; only message in thread
From: Mike Christie @ 2006-02-02  3:06 UTC (permalink / raw)
  To: linux-scsi, open-iscsi

>From andmike@us.ibm.com:

 Ensure that pool data is setup prior to calling mempool_create as it will
 call the the alloc function during create.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>



diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 79ca29e..448fd78 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -530,6 +530,12 @@ mempool_zone_init(unsigned max, unsigned
 	if (!zp)
 		return NULL;
 
+	zp->size = size;
+	zp->hiwat = hiwat;
+	INIT_LIST_HEAD(&zp->freequeue);
+	spin_lock_init(&zp->freelock);
+	atomic_set(&zp->allocated, 0);
+
 	zp->pool = mempool_create(max, mempool_zone_alloc_skb,
 				  mempool_zone_free_skb, zp);
 	if (!zp->pool) {
@@ -537,13 +543,6 @@ mempool_zone_init(unsigned max, unsigned
 		return NULL;
 	}
 
-	zp->size = size;
-	zp->hiwat = hiwat;
-
-	INIT_LIST_HEAD(&zp->freequeue);
-	spin_lock_init(&zp->freelock);
-	atomic_set(&zp->allocated, 0);
-
 	return zp;
 }
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-02  3:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-02  3:06 [PATCH 3/9] iscsi update: setup pool before using Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox