From 47b87b7948111fa95e99fbd60fc3255423b45809 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 8 Aug 2007 10:47:10 +0200 Subject: [PATCH] [SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache allocate gid_pn_data objects from gid_pn_cache. Allocate gid_pn_data objects from the corresponding cache which ensures proper alignment. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky Signed-off-by: Swen Schillig Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index ab5ec1feaf4e..90aa53fc4f3e 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -1503,7 +1503,7 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool) data->ct.pool = pool; } } else { - data = kmalloc(sizeof(struct zfcp_gid_pn_data), GFP_ATOMIC); + data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC); } if (NULL == data) @@ -1531,7 +1531,7 @@ static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn) if (gid_pn->ct.pool) mempool_free(gid_pn, gid_pn->ct.pool); else - kfree(gid_pn); + kmem_cache_free(zfcp_data.gid_pn_cache, gid_pn); } /** -- 2.30.2