/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
if (ni->ni_tx_queues != NULL)
cfs_percpt_free(ni->ni_tx_queues);
- if (ni->ni_cpts != NULL) {
- LIBCFS_FREE(ni->ni_cpts,
- sizeof(ni->ni_cpts[0] * ni->ni_ncpts));
- }
+ if (ni->ni_cpts != NULL)
+ cfs_expr_list_values_free(ni->ni_cpts, ni->ni_ncpts);
#ifndef __KERNEL__
# ifdef HAVE_LIBPTHREAD
}
#ifdef __KERNEL__
- cfs_spin_lock_init(&ni->ni_lock);
+ spin_lock_init(&ni->ni_lock);
#else
# ifdef HAVE_LIBPTHREAD
pthread_mutex_init(&ni->ni_lock, NULL);
ni->ni_ncpts = rc;
}
- /* LND will fill in the address part of the NID */
- ni->ni_nid = LNET_MKNID(net, 0);
- ni->ni_last_alive = cfs_time_current();
- cfs_list_add_tail(&ni->ni_list, nilist);
- return ni;
+ /* LND will fill in the address part of the NID */
+ ni->ni_nid = LNET_MKNID(net, 0);
+ ni->ni_last_alive = cfs_time_current_sec();
+ cfs_list_add_tail(&ni->ni_list, nilist);
+ return ni;
failed:
lnet_ni_free(ni);
return NULL;