Whamcloud - gitweb
i=liangzhen
[fs/lustre-release.git] / lnet / klnds / openiblnd / openiblnd_cb.c
index be869e9..a231e5e 100644 (file)
@@ -427,7 +427,7 @@ kibnal_kvaddr_to_phys (unsigned long vaddr, __u64 *physp)
         if (vaddr >= VMALLOC_START &&
             vaddr < VMALLOC_END)
                 page = vmalloc_to_page ((void *)vaddr);
-#if CONFIG_HIGHMEM
+#ifdef CONFIG_HIGHMEM
         else if (vaddr >= PKMAP_BASE &&
                  vaddr < (PKMAP_BASE + LAST_PKMAP * PAGE_SIZE))
                 page = vmalloc_to_page ((void *)vaddr);
@@ -1786,6 +1786,16 @@ kibnal_accept_connreq (kib_conn_t **connp, tTS_IB_CM_COMM_ID cid,
         
         write_lock_irqsave (&kibnal_data.kib_global_lock, flags);
 
+        if (kibnal_data.kib_nonewpeers) {
+                write_unlock_irqrestore (&kibnal_data.kib_global_lock, flags);
+                
+                CERROR ("Shutdown has started, drop connreq from %s\n",
+                        libcfs_nid2str(msg->ibm_srcnid));
+                kibnal_conn_decref(conn);
+                kibnal_peer_decref(peer);
+                return -ESHUTDOWN;
+        }
+
         /* Check I'm the same instance that gave the connection parameters.  
          * NB If my incarnation changes after this, the peer will get nuked and
          * we'll spot that when the connection is finally added into the peer's