summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/lnet/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/peer.c')
-rw-r--r--drivers/staging/lustre/lnet/lnet/peer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/peer.c b/drivers/staging/lustre/lnet/lnet/peer.c
index 5e94ad349454..3e157c10fec4 100644
--- a/drivers/staging/lustre/lnet/lnet/peer.c
+++ b/drivers/staging/lustre/lnet/lnet/peer.c
@@ -56,8 +56,8 @@ lnet_peer_tables_create(void)
cfs_percpt_for_each(ptable, i, the_lnet.ln_peer_tables) {
INIT_LIST_HEAD(&ptable->pt_deathrow);
- LIBCFS_CPT_ALLOC(hash, lnet_cpt_table(), i,
- LNET_PEER_HASH_SIZE * sizeof(*hash));
+ hash = kvmalloc_cpt(LNET_PEER_HASH_SIZE * sizeof(*hash),
+ GFP_KERNEL, i);
if (!hash) {
CERROR("Failed to create peer hash table\n");
lnet_peer_tables_destroy();
@@ -94,7 +94,7 @@ lnet_peer_tables_destroy(void)
for (j = 0; j < LNET_PEER_HASH_SIZE; j++)
LASSERT(list_empty(&hash[j]));
- LIBCFS_FREE(hash, LNET_PEER_HASH_SIZE * sizeof(*hash));
+ kvfree(hash);
}
cfs_percpt_free(the_lnet.ln_peer_tables);
@@ -212,7 +212,7 @@ lnet_peer_tables_cleanup(struct lnet_ni *ni)
list_for_each_entry_safe(lp, temp, &deathrow, lp_hashlist) {
list_del(&lp->lp_hashlist);
- LIBCFS_FREE(lp, sizeof(*lp));
+ kfree(lp);
}
}
@@ -297,7 +297,7 @@ lnet_nid2peer_locked(struct lnet_peer **lpp, lnet_nid_t nid, int cpt)
if (lp)
memset(lp, 0, sizeof(*lp));
else
- LIBCFS_CPT_ALLOC(lp, lnet_cpt_table(), cpt2, sizeof(*lp));
+ lp = kzalloc_cpt(sizeof(*lp), GFP_NOFS, cpt2);
if (!lp) {
rc = -ENOMEM;