Whamcloud - gitweb
LU-7734 lnet: fix routing selection
[fs/lustre-release.git] / lnet / lnet / net_fault.c
index b5c69f2..91c9c6b 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2014, Intel Corporation.
+ * Copyright (c) 2014, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -617,8 +617,9 @@ delayed_msg_process(struct list_head *msg_list, bool drop)
 
                msg = list_entry(msg_list->next, struct lnet_msg, msg_list);
                LASSERT(msg->msg_rxpeer != NULL);
+               LASSERT(msg->msg_rxni != NULL);
 
-               ni = msg->msg_rxpeer->lp_ni;
+               ni = msg->msg_rxni;
                cpt = msg->msg_rx_cpt;
 
                list_del_init(&msg->msg_list);
@@ -730,7 +731,7 @@ int
 lnet_delay_rule_add(struct lnet_fault_attr *attr)
 {
        struct lnet_delay_rule *rule;
-       int                     rc = 0;
+       int                     rc = 0;
        ENTRY;
 
        if (!((attr->u.delay.la_rate == 0) ^
@@ -823,10 +824,10 @@ int
 lnet_delay_rule_del(lnet_nid_t src, lnet_nid_t dst, bool shutdown)
 {
        struct lnet_delay_rule *rule;
-       struct lnet_delay_rule  *tmp;
-       struct list_head        rule_list;
+       struct lnet_delay_rule  *tmp;
+       struct list_head        rule_list;
        struct list_head        msg_list;
-       int                     n = 0;
+       int                     n = 0;
        bool                    cleanup;
        ENTRY;
 
@@ -893,9 +894,9 @@ lnet_delay_rule_list(int pos, struct lnet_fault_attr *attr,
                    struct lnet_fault_stat *stat)
 {
        struct lnet_delay_rule *rule;
-       int                     cpt;
-       int                     i = 0;
-       int                     rc = -ENOENT;
+       int                     cpt;
+       int                     i = 0;
+       int                     rc = -ENOENT;
        ENTRY;
 
        cpt = lnet_net_lock_current();
@@ -922,7 +923,7 @@ void
 lnet_delay_rule_reset(void)
 {
        struct lnet_delay_rule *rule;
-       int                     cpt;
+       int                     cpt;
        ENTRY;
 
        cpt = lnet_net_lock_current();