int rc;
export = list_entry(tmp, struct obd_export, exp_chain);
- CERROR("force disconnecting export %p\n", export);
conn.addr = (__u64)(unsigned long)export;
conn.cookie = export->exp_cookie;
spin_unlock(&obddev->obd_dev_lock);
+ CERROR("force disconnecting export %p\n", export);
rc = obd_disconnect(&conn);
if (rc < 0) {
/* AED: not so sure about this... We can't
void *key, obd_count *vallen, void **val)
{
struct obd_device *obd;
- struct obd_export * export;
ENTRY;
- if (!(export = class_conn2export(conn))) {
- CDEBUG(D_IOCTL, "invalid client %Lx\n", conn->addr);
+ obd = class_conn2obd(conn);
+ if (!obd) {
+ CDEBUG(D_IOCTL, "invalid client "LPX64"\n", conn->addr);
RETURN(-EINVAL);
}
- obd = class_conn2obd(conn);
-
if ( keylen == strlen("blocksize") &&
memcmp(key, "blocksize", keylen) == 0 ) {
*vallen = sizeof(long);
int rc = 0;
ENTRY;
- CDEBUG(D_INFO, "connection=%p\n", c);
+ CDEBUG(D_INFO, "connection=%p refcount %d\n",
+ c, atomic_read(&c->c_refcount) - 1);
if (atomic_dec_and_test(&c->c_refcount)) {
spin_lock(&conn_lock);
list_del(&c->c_link);
rc = 1;
}
if (atomic_read(&c->c_refcount) < 0)
- CDEBUG(D_INFO, "refcount < 0 for connection %p!\n", c);
+ CERROR("connection %p refcount %d!\n",
+ c, atomic_read(&c->c_refcount));
RETURN(rc);
}
struct ptlrpc_connection *ptlrpc_connection_addref(struct ptlrpc_connection *c)
{
ENTRY;
- CDEBUG(D_INFO, "connection=%p\n", c);
+ CDEBUG(D_INFO, "connection=%p refcount %d\n",
+ c, atomic_read(&c->c_refcount) + 1);
atomic_inc(&c->c_refcount);
RETURN(c);
}
request.rq_reqlen, svc->srv_req_portal,
event->initiator.nid, request.rq_xid);
spin_unlock(&svc->srv_lock);
- return -EINVAL;
+ RETURN(-EINVAL);
}
if (request.rq_reqmsg->magic != PTLRPC_MSG_MAGIC) {
request.rq_reqmsg->magic, svc->srv_req_portal,
event->initiator.nid, request.rq_xid);
spin_unlock(&svc->srv_lock);
- return -EINVAL;
+ RETURN(-EINVAL);
}
if (request.rq_reqmsg->version != PTLRPC_MSG_VERSION) {
request.rq_reqmsg->version, svc->srv_req_portal,
event->initiator.nid, request.rq_xid);
spin_unlock(&svc->srv_lock);
- return -EINVAL;
+ RETURN(-EINVAL);
}
CDEBUG(D_NET, "got req %Ld\n", request.rq_xid);