Skip to content

Commit

Permalink
[SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache
Browse files Browse the repository at this point in the history
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Heiko Carstens authored and James Bottomley committed Aug 15, 2007
1 parent 83f6d6d commit 47b87b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 47b87b7

Please sign in to comment.