From 03c37362be026eb31c79dc3be28f35e28df1a3b0 Mon Sep 17 00:00:00 2001 From: braam Date: Mon, 29 Apr 2002 20:36:57 +0000 Subject: [PATCH] - see message on previous commit. --- lustre/lib/mds_updates.c | 4 ---- lustre/ost/ost_handler.c | 6 +++--- lustre/ptlrpc/connection.c | 6 ++++-- lustre/ptlrpc/events.c | 2 +- lustre/ptlrpc/pack_generic.c | 2 ++ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lustre/lib/mds_updates.c b/lustre/lib/mds_updates.c index 734d6e8..340f283 100644 --- a/lustre/lib/mds_updates.c +++ b/lustre/lib/mds_updates.c @@ -66,8 +66,6 @@ static void mds_pack_body(struct mds_body *b) b->nlink = HTON__u32(b->nlink); b->generation = HTON__u32(b->generation); b->last_xid = HTON__u32(b->last_xid); - b->last_committed = HTON__u64(b->last_committed); - b->last_rcvd = HTON__u64(b->last_rcvd); } void mds_pack_req_body(struct ptlrpc_request *req) @@ -169,8 +167,6 @@ static void mds_unpack_body(struct mds_body *b) b->nlink = NTOH__u32(b->nlink); b->generation = NTOH__u32(b->generation); b->last_xid = NTOH__u32(b->last_xid); - b->last_rcvd = NTOH__u64(b->last_rcvd); - b->last_committed = NTOH__u64(b->last_committed); } diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 00971b0..a0926f1 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -328,7 +328,7 @@ static int ost_brw_read(struct ost_obd *obddev, struct ptlrpc_request *req) if (bulk->b_flags & PTL_RPC_FL_INTR) GOTO(out, 0); - OBD_FREE(bulk, sizeof(*bulk)); + ptlrpc_free_bulk(bulk); } bulk = NULL; @@ -343,11 +343,11 @@ static int ost_brw_read(struct ost_obd *obddev, struct ptlrpc_request *req) if (res != NULL) OBD_FREE(res, sizeof(*res) * niocount); if (bulk != NULL) - OBD_FREE(bulk, sizeof(*bulk)); + ptlrpc_free_bulk(bulk); if (bulk_vec != NULL) { for (i = 0; i < niocount; i++) if (bulk_vec[i] != NULL) - OBD_FREE(bulk_vec[i], sizeof(*bulk)); + ptlrpc_free_bulk(bulk_vec[i]); OBD_FREE(bulk_vec, niocount * sizeof(*bulk_vec)); } diff --git a/lustre/ptlrpc/connection.c b/lustre/ptlrpc/connection.c index 78c320c..a34ff43 100644 --- a/lustre/ptlrpc/connection.c +++ b/lustre/ptlrpc/connection.c @@ -82,6 +82,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); @@ -91,13 +92,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) diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index eb49df4..2666fda 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -185,7 +185,7 @@ static int bulk_sink_callback(ptl_event_t *ev, void *data) /* FIXME: This should happen unconditionally */ if (bulk->b_cb != NULL) - OBD_FREE(bulk, sizeof(*bulk)); + ptlrpc_free_bulk(bulk); EXIT; return 1; diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 76140ed..b110462 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -88,6 +88,8 @@ int lustre_unpack_msg(struct lustre_msg *m, int len) m->type = NTOH__u32(m->type); m->connid = NTOH__u32(m->connid); m->bufcount = NTOH__u32(m->bufcount); + m->last_rcvd = NTOH__u32(m->last_rcvd); + m->last_committed = NTOH__u32(m->last_committed); required_len += m->bufcount * sizeof(__u32); if (len < required_len) -- 1.8.3.1