Whamcloud - gitweb
LU-8022 lnet: Correct position of lnet_ni_decref() 01/21001/2
authorDoug Oucharek <doug.s.oucharek@intel.com>
Mon, 27 Jun 2016 17:34:44 +0000 (10:34 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 5 Jul 2016 23:47:24 +0000 (23:47 +0000)
In fix http://review.whamcloud.com/#/c/19614/, the call
to lnet_ni_decref() should have followed the routines
which are using the NI.  This patch correct that.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I55fba4904cc6442f63cf03bf2e3614a7946200f7
Reviewed-on: http://review.whamcloud.com/21001
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/o2iblnd/o2iblnd_cb.c

index 79eb8b7..b13fcf9 100644 (file)
@@ -2522,10 +2522,10 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob)
 
  failed:
        if (ni != NULL) {
-               lnet_ni_decref(ni);
                rej.ibr_cp.ibcp_queue_depth =
                        kiblnd_msg_queue_size(version, ni);
                rej.ibr_cp.ibcp_max_frags   = kiblnd_rdma_frags(version, ni);
+               lnet_ni_decref(ni);
        }
 
        rej.ibr_version = version;