diff options
author | Matthew Dobson <colpatch@us.ibm.com> | 2006-03-26 04:37:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:00 -0500 |
commit | 93d2341c750cda0df48a6cc67b35fe25f1ec47df (patch) | |
tree | f098a3bbfae65ce967591ee94d605c6e6bea21c6 /drivers/scsi | |
parent | fec433aaaae32a02329ad7d71b0f3c91b7525077 (diff) |
[PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool()
rather than calling mempool_create() with extra arguments, saving about 30
lines of code and increasing readability.
Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 3 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 |
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 7b82ff090d42..2068b66822b7 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -3200,8 +3200,8 @@ iscsi_r2tpool_alloc(struct iscsi_session *session) | |||
3200 | * Data-Out PDU's within R2T-sequence can be quite big; | 3200 | * Data-Out PDU's within R2T-sequence can be quite big; |
3201 | * using mempool | 3201 | * using mempool |
3202 | */ | 3202 | */ |
3203 | ctask->datapool = mempool_create(ISCSI_DTASK_DEFAULT_MAX, | 3203 | ctask->datapool = mempool_create_slab_pool(ISCSI_DTASK_DEFAULT_MAX, |
3204 | mempool_alloc_slab, mempool_free_slab, taskcache); | 3204 | taskcache); |
3205 | if (ctask->datapool == NULL) { | 3205 | if (ctask->datapool == NULL) { |
3206 | kfifo_free(ctask->r2tqueue); | 3206 | kfifo_free(ctask->r2tqueue); |
3207 | iscsi_pool_free(&ctask->r2tpool, (void**)ctask->r2ts); | 3207 | iscsi_pool_free(&ctask->r2tpool, (void**)ctask->r2ts); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 029bbf461bb2..017729c59a49 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2154,8 +2154,7 @@ qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) | |||
2154 | int rval; | 2154 | int rval; |
2155 | 2155 | ||
2156 | rval = QLA_SUCCESS; | 2156 | rval = QLA_SUCCESS; |
2157 | ha->srb_mempool = mempool_create(SRB_MIN_REQ, mempool_alloc_slab, | 2157 | ha->srb_mempool = mempool_create_slab_pool(SRB_MIN_REQ, srb_cachep); |
2158 | mempool_free_slab, srb_cachep); | ||
2159 | if (ha->srb_mempool == NULL) { | 2158 | if (ha->srb_mempool == NULL) { |
2160 | qla_printk(KERN_INFO, ha, "Unable to allocate SRB mempool.\n"); | 2159 | qla_printk(KERN_INFO, ha, "Unable to allocate SRB mempool.\n"); |
2161 | rval = QLA_FUNCTION_FAILED; | 2160 | rval = QLA_FUNCTION_FAILED; |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ede158d08d9d..8f010a314a3d 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1787,9 +1787,8 @@ int __init scsi_init_queue(void) | |||
1787 | sgp->name); | 1787 | sgp->name); |
1788 | } | 1788 | } |
1789 | 1789 | ||
1790 | sgp->pool = mempool_create(SG_MEMPOOL_SIZE, | 1790 | sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, |
1791 | mempool_alloc_slab, mempool_free_slab, | 1791 | sgp->slab); |
1792 | sgp->slab); | ||
1793 | if (!sgp->pool) { | 1792 | if (!sgp->pool) { |
1794 | printk(KERN_ERR "SCSI: can't init sg mempool %s\n", | 1793 | printk(KERN_ERR "SCSI: can't init sg mempool %s\n", |
1795 | sgp->name); | 1794 | sgp->name); |