diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 033c58a65f50..aa8d5de58839 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -65,7 +65,7 @@ static struct scsi_host_sg_pool scsi_sg_pools[] = { | |||
65 | }; | 65 | }; |
66 | #undef SP | 66 | #undef SP |
67 | 67 | ||
68 | static struct kmem_cache *scsi_bidi_sdb_cache; | 68 | static struct kmem_cache *scsi_sdb_cache; |
69 | 69 | ||
70 | static void scsi_run_queue(struct request_queue *q); | 70 | static void scsi_run_queue(struct request_queue *q); |
71 | 71 | ||
@@ -775,7 +775,7 @@ void scsi_release_buffers(struct scsi_cmnd *cmd) | |||
775 | struct scsi_data_buffer *bidi_sdb = | 775 | struct scsi_data_buffer *bidi_sdb = |
776 | cmd->request->next_rq->special; | 776 | cmd->request->next_rq->special; |
777 | scsi_free_sgtable(bidi_sdb); | 777 | scsi_free_sgtable(bidi_sdb); |
778 | kmem_cache_free(scsi_bidi_sdb_cache, bidi_sdb); | 778 | kmem_cache_free(scsi_sdb_cache, bidi_sdb); |
779 | cmd->request->next_rq->special = NULL; | 779 | cmd->request->next_rq->special = NULL; |
780 | } | 780 | } |
781 | } | 781 | } |
@@ -1050,7 +1050,7 @@ int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask) | |||
1050 | 1050 | ||
1051 | if (blk_bidi_rq(cmd->request)) { | 1051 | if (blk_bidi_rq(cmd->request)) { |
1052 | struct scsi_data_buffer *bidi_sdb = kmem_cache_zalloc( | 1052 | struct scsi_data_buffer *bidi_sdb = kmem_cache_zalloc( |
1053 | scsi_bidi_sdb_cache, GFP_ATOMIC); | 1053 | scsi_sdb_cache, GFP_ATOMIC); |
1054 | if (!bidi_sdb) { | 1054 | if (!bidi_sdb) { |
1055 | error = BLKPREP_DEFER; | 1055 | error = BLKPREP_DEFER; |
1056 | goto err_exit; | 1056 | goto err_exit; |
@@ -1692,11 +1692,11 @@ int __init scsi_init_queue(void) | |||
1692 | return -ENOMEM; | 1692 | return -ENOMEM; |
1693 | } | 1693 | } |
1694 | 1694 | ||
1695 | scsi_bidi_sdb_cache = kmem_cache_create("scsi_bidi_sdb", | 1695 | scsi_sdb_cache = kmem_cache_create("scsi_data_buffer", |
1696 | sizeof(struct scsi_data_buffer), | 1696 | sizeof(struct scsi_data_buffer), |
1697 | 0, 0, NULL); | 1697 | 0, 0, NULL); |
1698 | if (!scsi_bidi_sdb_cache) { | 1698 | if (!scsi_sdb_cache) { |
1699 | printk(KERN_ERR "SCSI: can't init scsi bidi sdb cache\n"); | 1699 | printk(KERN_ERR "SCSI: can't init scsi sdb cache\n"); |
1700 | goto cleanup_io_context; | 1700 | goto cleanup_io_context; |
1701 | } | 1701 | } |
1702 | 1702 | ||
@@ -1709,7 +1709,7 @@ int __init scsi_init_queue(void) | |||
1709 | if (!sgp->slab) { | 1709 | if (!sgp->slab) { |
1710 | printk(KERN_ERR "SCSI: can't init sg slab %s\n", | 1710 | printk(KERN_ERR "SCSI: can't init sg slab %s\n", |
1711 | sgp->name); | 1711 | sgp->name); |
1712 | goto cleanup_bidi_sdb; | 1712 | goto cleanup_sdb; |
1713 | } | 1713 | } |
1714 | 1714 | ||
1715 | sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, | 1715 | sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, |
@@ -1717,13 +1717,13 @@ int __init scsi_init_queue(void) | |||
1717 | if (!sgp->pool) { | 1717 | if (!sgp->pool) { |
1718 | printk(KERN_ERR "SCSI: can't init sg mempool %s\n", | 1718 | printk(KERN_ERR "SCSI: can't init sg mempool %s\n", |
1719 | sgp->name); | 1719 | sgp->name); |
1720 | goto cleanup_bidi_sdb; | 1720 | goto cleanup_sdb; |
1721 | } | 1721 | } |
1722 | } | 1722 | } |
1723 | 1723 | ||
1724 | return 0; | 1724 | return 0; |
1725 | 1725 | ||
1726 | cleanup_bidi_sdb: | 1726 | cleanup_sdb: |
1727 | for (i = 0; i < SG_MEMPOOL_NR; i++) { | 1727 | for (i = 0; i < SG_MEMPOOL_NR; i++) { |
1728 | struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; | 1728 | struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; |
1729 | if (sgp->pool) | 1729 | if (sgp->pool) |
@@ -1731,7 +1731,7 @@ cleanup_bidi_sdb: | |||
1731 | if (sgp->slab) | 1731 | if (sgp->slab) |
1732 | kmem_cache_destroy(sgp->slab); | 1732 | kmem_cache_destroy(sgp->slab); |
1733 | } | 1733 | } |
1734 | kmem_cache_destroy(scsi_bidi_sdb_cache); | 1734 | kmem_cache_destroy(scsi_sdb_cache); |
1735 | cleanup_io_context: | 1735 | cleanup_io_context: |
1736 | kmem_cache_destroy(scsi_io_context_cache); | 1736 | kmem_cache_destroy(scsi_io_context_cache); |
1737 | 1737 | ||
@@ -1743,7 +1743,7 @@ void scsi_exit_queue(void) | |||
1743 | int i; | 1743 | int i; |
1744 | 1744 | ||
1745 | kmem_cache_destroy(scsi_io_context_cache); | 1745 | kmem_cache_destroy(scsi_io_context_cache); |
1746 | kmem_cache_destroy(scsi_bidi_sdb_cache); | 1746 | kmem_cache_destroy(scsi_sdb_cache); |
1747 | 1747 | ||
1748 | for (i = 0; i < SG_MEMPOOL_NR; i++) { | 1748 | for (i = 0; i < SG_MEMPOOL_NR; i++) { |
1749 | struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; | 1749 | struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; |