diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2011-02-22 13:54:42 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-25 12:02:06 -0500 |
commit | fcf7e6144df60cd5082e5bc52f1ca5d1ca99a2d6 (patch) | |
tree | 0a8b078f47af2ed0e94dfb5cf887723af53a72a2 /drivers/s390/scsi/zfcp_aux.c | |
parent | 087897e36982ef8536dc9c8baed159a31517b5e6 (diff) |
[SCSI] zfcp: Allocate GID_PN data through new FC kmem_cache
Allocate the data for the GID_PN request through the new FC
kmem_cache. While updating the GID_PN code, also introduce a helper
function for initializing the CT header for FC nameserver requests.
Remove the "paranoia" check as well, the GID_PN request data does not
suddenly change.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index adbc05c44362..6d2beb6ad9ee 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -132,11 +132,6 @@ static int __init zfcp_module_init(void) | |||
132 | if (!zfcp_data.qtcb_cache) | 132 | if (!zfcp_data.qtcb_cache) |
133 | goto out_qtcb_cache; | 133 | goto out_qtcb_cache; |
134 | 134 | ||
135 | zfcp_data.gid_pn_cache = zfcp_cache_hw_align("zfcp_gid", | ||
136 | sizeof(struct zfcp_fc_gid_pn)); | ||
137 | if (!zfcp_data.gid_pn_cache) | ||
138 | goto out_gid_cache; | ||
139 | |||
140 | zfcp_fc_req_cache = zfcp_cache_hw_align("zfcp_fc_req", | 135 | zfcp_fc_req_cache = zfcp_cache_hw_align("zfcp_fc_req", |
141 | sizeof(struct zfcp_fc_req)); | 136 | sizeof(struct zfcp_fc_req)); |
142 | if (!zfcp_fc_req_cache) | 137 | if (!zfcp_fc_req_cache) |
@@ -174,8 +169,6 @@ out_misc: | |||
174 | out_transport: | 169 | out_transport: |
175 | kmem_cache_destroy(zfcp_fc_req_cache); | 170 | kmem_cache_destroy(zfcp_fc_req_cache); |
176 | out_fc_cache: | 171 | out_fc_cache: |
177 | kmem_cache_destroy(zfcp_data.gid_pn_cache); | ||
178 | out_gid_cache: | ||
179 | kmem_cache_destroy(zfcp_data.qtcb_cache); | 172 | kmem_cache_destroy(zfcp_data.qtcb_cache); |
180 | out_qtcb_cache: | 173 | out_qtcb_cache: |
181 | kmem_cache_destroy(zfcp_data.gpn_ft_cache); | 174 | kmem_cache_destroy(zfcp_data.gpn_ft_cache); |
@@ -191,7 +184,6 @@ static void __exit zfcp_module_exit(void) | |||
191 | misc_deregister(&zfcp_cfdc_misc); | 184 | misc_deregister(&zfcp_cfdc_misc); |
192 | fc_release_transport(zfcp_data.scsi_transport_template); | 185 | fc_release_transport(zfcp_data.scsi_transport_template); |
193 | kmem_cache_destroy(zfcp_fc_req_cache); | 186 | kmem_cache_destroy(zfcp_fc_req_cache); |
194 | kmem_cache_destroy(zfcp_data.gid_pn_cache); | ||
195 | kmem_cache_destroy(zfcp_data.qtcb_cache); | 187 | kmem_cache_destroy(zfcp_data.qtcb_cache); |
196 | kmem_cache_destroy(zfcp_data.gpn_ft_cache); | 188 | kmem_cache_destroy(zfcp_data.gpn_ft_cache); |
197 | } | 189 | } |
@@ -263,7 +255,7 @@ static int zfcp_allocate_low_mem_buffers(struct zfcp_adapter *adapter) | |||
263 | return -ENOMEM; | 255 | return -ENOMEM; |
264 | 256 | ||
265 | adapter->pool.gid_pn = | 257 | adapter->pool.gid_pn = |
266 | mempool_create_slab_pool(1, zfcp_data.gid_pn_cache); | 258 | mempool_create_slab_pool(1, zfcp_fc_req_cache); |
267 | if (!adapter->pool.gid_pn) | 259 | if (!adapter->pool.gid_pn) |
268 | return -ENOMEM; | 260 | return -ENOMEM; |
269 | 261 | ||