Whamcloud - gitweb
LU-7734 lnet: rename LND peer to peer_ni
[fs/lustre-release.git] / lnet / klnds / socklnd / socklnd_proto.c
index 12165a3..dff1166 100644 (file)
@@ -361,14 +361,14 @@ ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk)
 static int
 ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote)
 {
-       ksock_peer_t   *peer = c->ksnc_peer;
+       ksock_peer_ni_t   *peer_ni = c->ksnc_peer;
        ksock_conn_t   *conn;
        ksock_tx_t     *tx;
        int             rc;
 
        read_lock(&ksocknal_data.ksnd_global_lock);
 
-       conn = ksocknal_find_conn_locked(peer, NULL, !!remote);
+       conn = ksocknal_find_conn_locked(peer_ni, NULL, !!remote);
        if (conn != NULL) {
                ksock_sched_t *sched = conn->ksnc_scheduler;
 
@@ -393,7 +393,7 @@ ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote)
         if (tx == NULL)
                 return -ENOMEM;
 
-        if ((rc = ksocknal_launch_packet(peer->ksnp_ni, tx, peer->ksnp_id)) == 0)
+        if ((rc = ksocknal_launch_packet(peer_ni->ksnp_ni, tx, peer_ni->ksnp_id)) == 0)
                 return 0;
 
         ksocknal_free_tx(tx);
@@ -404,7 +404,7 @@ ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote)
 static int
 ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2)
 {
-        ksock_peer_t      *peer = conn->ksnc_peer;
+        ksock_peer_ni_t      *peer_ni = conn->ksnc_peer;
         ksock_tx_t        *tx;
         ksock_tx_t        *tmp;
        struct list_head        zlist = LIST_HEAD_INIT(zlist);
@@ -421,10 +421,10 @@ ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2)
                 return count == 1 ? 0 : -EPROTO;
         }
 
-       spin_lock(&peer->ksnp_lock);
+       spin_lock(&peer_ni->ksnp_lock);
 
        list_for_each_entry_safe(tx, tmp,
-                                     &peer->ksnp_zc_req_list, tx_zc_list) {
+                                     &peer_ni->ksnp_zc_req_list, tx_zc_list) {
                 __u64 c = tx->tx_msg.ksm_zc_cookies[0];
 
                 if (c == cookie1 || c == cookie2 || (cookie1 < c && c < cookie2)) {
@@ -437,7 +437,7 @@ ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2)
                 }
         }
 
-       spin_unlock(&peer->ksnp_lock);
+       spin_unlock(&peer_ni->ksnp_lock);
 
        while (!list_empty(&zlist)) {
                tx = list_entry(zlist.next, ksock_tx_t, tx_zc_list);