Whamcloud - gitweb
- remove the unused 'id' from mdc_enqueue
authorpschwan <pschwan>
Mon, 2 Sep 2002 06:38:17 +0000 (06:38 +0000)
committerpschwan <pschwan>
Mon, 2 Sep 2002 06:38:17 +0000 (06:38 +0000)
- fix yet another LBUG related to calling ptlrpc_error after allocating a reply
  buffer

lustre/include/linux/lustre_mds.h
lustre/ldlm/ldlm_request.c
lustre/lib/l_net.c
lustre/mdc/mdc_request.c

index 16074a7..c758880 100644 (file)
@@ -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,
index cbf3aeb..897e1ad 100644 (file)
@@ -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) {
index 04aa983..27c96e6 100644 (file)
@@ -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;
index fbc36b9..0d9fa7f 100644 (file)
@@ -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);