summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-01-09 12:19:38 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-09 15:39:28 +0100
commit3c88bdbbf919c1181d6ae14afa6c3a9b0de57b34 (patch)
treebe363ec739afc9b09338fc260f33ef94418efa50 /drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
parent9ab7bc50a8b0564aac43c9fa1f8c3bcf12536c05 (diff)
staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.
All usages of the form LIBCFS_ALLOC(variable, sizeof(variable)) or LIBCFS_ALLOC(variable, sizeof(variable's-type)) are changed to variable = kzalloc(sizeof(...), GFP_NOFS); Similarly, all LIBCFS_FREE(variable, sizeof(variable)) become kfree(variable); None of these need the vmalloc option, or any of the other minor benefits of LIBCFS_ALLOC(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c')
-rw-r--r--drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index 40e3af5d8b04..9b3328c5d1e7 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -2124,7 +2124,7 @@ kiblnd_connreq_done(struct kib_conn *conn, int status)
(conn->ibc_state == IBLND_CONN_PASSIVE_WAIT &&
peer->ibp_accepting > 0));
- LIBCFS_FREE(conn->ibc_connvars, sizeof(*conn->ibc_connvars));
+ kfree(conn->ibc_connvars);
conn->ibc_connvars = NULL;
if (status) {
@@ -3363,7 +3363,7 @@ kiblnd_connd(void *arg)
reconn += kiblnd_reconnect_peer(conn->ibc_peer);
kiblnd_peer_decref(conn->ibc_peer);
- LIBCFS_FREE(conn, sizeof(*conn));
+ kfree(conn);
spin_lock_irqsave(lock, flags);
}