*
*/
-#define EXPORT_SYMTAB
-
#define DEBUG_SUBSYSTEM S_RPC
#include <linux/lustre_net.h>
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);
int ptlrpc_put_connection(struct ptlrpc_connection *c)
{
int rc = 0;
+ ENTRY;
if (atomic_dec_and_test(&c->c_refcount)) {
spin_lock(&conn_lock);
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)