summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-02-01 21:06:58 -0600
committer <jejb@mulgrave.il.steeleye.com>2006-02-04 16:18:27 -0600
commit142e301fc818de9b116706835cd9fc864e73f203 (patch)
treeb37eb345383e77a6dc1bc27b33c2db22f5af0000 /drivers/scsi/scsi_transport_iscsi.c
parent5b940adf5b341b12dbb94e7cbdb416b35f52017b (diff)
downloadblackbird-op-linux-142e301fc818de9b116706835cd9fc864e73f203.tar.gz
blackbird-op-linux-142e301fc818de9b116706835cd9fc864e73f203.zip
[SCSI] iscsi update: setup pool before using
>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> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 79ca29ee1aee..448fd78777f9 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 size, unsigned hiwat)
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 size, unsigned hiwat)
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;
}
OpenPOWER on IntegriCloud