+ LASSERT (!list_empty(restarts));
+
+ if (kptllnd_find_target(&peer, target) != 0)
+ peer = NULL;
+
+ list_for_each_entry_safe (tx, tmp, restarts, tx_list) {
+ LASSERT (tx->tx_peer != NULL);
+ LASSERT (tx->tx_type == TX_TYPE_GET_REQUEST ||
+ tx->tx_type == TX_TYPE_PUT_REQUEST ||
+ tx->tx_type == TX_TYPE_SMALL_MESSAGE);
+
+ list_del_init(&tx->tx_list);
+
+ if (peer == NULL ||
+ tx->tx_msg->ptlm_type == PTLLND_MSG_TYPE_HELLO) {
+ kptllnd_tx_decref(tx);
+ continue;
+ }
+
+ LASSERT (tx->tx_msg->ptlm_type != PTLLND_MSG_TYPE_NOOP);
+ tx->tx_status = 0;
+ tx->tx_active = 1;
+ kptllnd_peer_decref(tx->tx_peer);
+ tx->tx_peer = NULL;
+ kptllnd_set_tx_peer(tx, peer);
+ kptllnd_queue_tx(peer, tx); /* takes over my ref on tx */
+ }
+
+ if (peer == NULL)
+ return;
+
+ kptllnd_peer_check_sends(peer);
+ kptllnd_peer_decref(peer);