it also had a bug which could cause knet to crash after a host was
removed.
This patch puts new nodes at the front of the list rather than at the
end, but I don't think this is a problem.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
/*
* add new host to host list
*/
- if (!knet_h->host_head) {
- knet_h->host_head = host;
- knet_h->host_tail = host;
- } else {
- knet_h->host_tail->next = host;
- knet_h->host_tail = host;
+ if (knet_h->host_head) {
+ host->next = knet_h->host_head;
}
+ knet_h->host_head = host;
_host_list_update(knet_h);
unsigned int data_mtu; /* contains the max data size that we can send onwire
* without frags */
struct knet_host *host_head;
- struct knet_host *host_tail;
struct knet_host *host_index[KNET_MAX_HOST];
knet_transport_t transports[KNET_MAX_TRANSPORTS+1];
struct knet_transport_ops *transport_ops[KNET_MAX_TRANSPORTS+1];