From dd54085f101a486df2c12984dcaf83c64b7c8ef5 Mon Sep 17 00:00:00 2001 From: pschwan Date: Mon, 2 Sep 2002 06:38:17 +0000 Subject: [PATCH] - remove the unused 'id' from mdc_enqueue - fix yet another LBUG related to calling ptlrpc_error after allocating a reply buffer --- lustre/include/linux/lustre_mds.h | 6 +++--- lustre/ldlm/ldlm_request.c | 2 +- lustre/lib/l_net.c | 4 ++-- lustre/mdc/mdc_request.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h index 16074a7..c758880 100644 --- a/lustre/include/linux/lustre_mds.h +++ b/lustre/include/linux/lustre_mds.h @@ -145,9 +145,9 @@ extern int mdc_con2cl(struct lustre_handle *conn, struct ptlrpc_client **cl, struct lustre_handle **rconn); int mdc_enqueue(struct lustre_handle *conn, int lock_type, - struct lookup_intent *it, int lock_mode, struct inode *dir, - struct dentry *de, struct lustre_handle *h, __u64 id, - char *tgt, int tgtlen, void *data, int datalen); + struct lookup_intent *it, int lock_mode, struct inode *dir, + struct dentry *de, struct lustre_handle *lockh, char *tgt, + int tgtlen, void *data, int datalen); int mdc_getlovinfo(struct obd_device *obd, struct lustre_handle *mdc_connh, uuid_t **uuids, struct ptlrpc_request **request); int mdc_getstatus(struct lustre_handle *conn, diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index cbf3aeb..897e1ad 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -408,7 +408,7 @@ int ldlm_cli_cancel_unused(struct ldlm_namespace *ns, __u64 *res_id) res = ldlm_resource_get(ns, NULL, res_id, 0, 0); if (res == NULL) - RETURN(-ENOMEM); + RETURN(-EINVAL); l_lock(&ns->ns_lock); list_for_each(tmp, &res->lr_granted) { diff --git a/lustre/lib/l_net.c b/lustre/lib/l_net.c index 04aa983..27c96e6 100644 --- a/lustre/lib/l_net.c +++ b/lustre/lib/l_net.c @@ -268,11 +268,11 @@ int target_handle_connect(struct ptlrpc_request *req) conn.addr = req->rq_reqmsg->addr; conn.cookie = req->rq_reqmsg->cookie; - rc = lustre_pack_msg(0, NULL, NULL, &req->rq_replen, &req->rq_repmsg); + rc = obd_connect(&conn, target, cluuid); if (rc) GOTO(out, rc); - rc = obd_connect(&conn, target, cluuid); + rc = lustre_pack_msg(0, NULL, NULL, &req->rq_replen, &req->rq_repmsg); if (rc) GOTO(out, rc); req->rq_repmsg->addr = conn.addr; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index fbc36b9..0d9fa7f 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -213,7 +213,7 @@ static int mdc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, int mdc_enqueue(struct lustre_handle *conn, int lock_type, struct lookup_intent *it, int lock_mode, struct inode *dir, - struct dentry *de, struct lustre_handle *lockh, __u64 id, + struct dentry *de, struct lustre_handle *lockh, char *tgt, int tgtlen, void *data, int datalen) { struct ptlrpc_request *req; @@ -259,7 +259,7 @@ int mdc_enqueue(struct lustre_handle *conn, int lock_type, lit->opc = NTOH__u64((__u64)it->it_op); /* pack the intended request */ - mds_create_pack(req, 2, dir, it->it_mode, id, current->fsuid, + mds_create_pack(req, 2, dir, it->it_mode, 0, current->fsuid, current->fsgid, CURRENT_TIME, de->d_name.name, de->d_name.len, tgt, tgtlen); req->rq_replen = lustre_msg_size(3, repsize); -- 1.8.3.1