* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 2016, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
#define DEBUG_SUBSYSTEM S_LNET
+
+#include <linux/ctype.h>
#include <linux/nsproxy.h>
#include <net/net_namespace.h>
#include <lnet/lib-lnet.h>
LIBCFS_ALLOC(net->net_cpts, sizeof(*net->net_cpts) * ncpts);
if (net->net_cpts == NULL)
return -ENOMEM;
- memcpy(net->net_cpts, cpts, ncpts);
+ memcpy(net->net_cpts, cpts, ncpts * sizeof(*net->net_cpts));
net->net_ncpts = ncpts;
return 0;
}
}
spin_lock_init(&ni->ni_lock);
- INIT_LIST_HEAD(&ni->ni_cptlist);
INIT_LIST_HEAD(&ni->ni_netlist);
+ INIT_LIST_HEAD(&ni->ni_recovery);
ni->ni_refs = cfs_percpt_alloc(lnet_cpt_table(),
sizeof(*ni->ni_refs[0]));
if (ni->ni_refs == NULL)