From: adilger Date: Mon, 2 Sep 2002 21:26:40 +0000 (+0000) Subject: Minor cleanups. X-Git-Tag: 0.5.6~32 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=981b793ba1757b480b95488575aa0bd27678eec8;p=fs%2Flustre-release.git Minor cleanups. --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index be04a28..e82b772 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -393,10 +393,10 @@ void class_disconnect_all(struct obd_device *obddev) 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 diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 8de44d6..56cc673 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1280,16 +1280,14 @@ static int filter_get_info(struct lustre_handle *conn, obd_count keylen, 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); diff --git a/lustre/ptlrpc/connection.c b/lustre/ptlrpc/connection.c index 4c3b3de..8acb504 100644 --- a/lustre/ptlrpc/connection.c +++ b/lustre/ptlrpc/connection.c @@ -89,7 +89,8 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c) 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); @@ -98,7 +99,8 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c) 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); } @@ -106,7 +108,8 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c) 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); } diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index c812df6..36cd279 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -154,7 +154,7 @@ static int handle_incoming_request(struct obd_device *obddev, 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) { @@ -162,7 +162,7 @@ static int handle_incoming_request(struct obd_device *obddev, 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) { @@ -170,7 +170,7 @@ static int handle_incoming_request(struct obd_device *obddev, 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);