Whamcloud - gitweb
Remove no-longer-needed inode operations (they previously had extN EA VFS
[fs/lustre-release.git] / lustre / ptlrpc / connection.c
index 30f7f87..2723c15 100644 (file)
@@ -20,8 +20,6 @@
  *
  */
 
-#define EXPORT_SYMTAB
-
 #define DEBUG_SUBSYSTEM S_RPC
 
 #include <linux/lustre_net.h>
@@ -61,12 +59,14 @@ struct ptlrpc_connection *ptlrpc_get_connection(struct lustre_peer *peer)
         if (c == NULL)
                 GOTO(out, c);
 
+        c->c_level = LUSTRE_CONN_NEW;
         c->c_xid_in = 1;
         c->c_xid_out = 1;
         c->c_generation = 1;
         c->c_epoch = 1;
         c->c_bootcount = 0;
         atomic_set(&c->c_refcount, 1);
+        spin_lock_init(&c->c_lock);
 
         memcpy(&c->c_peer, peer, sizeof(c->c_peer));
         list_add(&c->c_link, &conn_list);
@@ -80,6 +80,7 @@ struct ptlrpc_connection *ptlrpc_get_connection(struct lustre_peer *peer)
 int ptlrpc_put_connection(struct ptlrpc_connection *c)
 {
         int rc = 0;
+        ENTRY;
 
         if (atomic_dec_and_test(&c->c_refcount)) {
                 spin_lock(&conn_lock);
@@ -89,13 +90,14 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c)
                 rc = 1;
         }
 
-        return rc;
+        RETURN(rc);
 }
 
 struct ptlrpc_connection *ptlrpc_connection_addref(struct ptlrpc_connection *c)
 {
+        ENTRY;
         atomic_inc(&c->c_refcount);
-        return c;
+        RETURN(c);
 }
 
 void ptlrpc_init_connection(void)