/* NB only peek inside req now; mdt_XXX_unpack() will swab it */
if (opcp == NULL) {
- CERROR ("Can't inspect opcode\n");
- RETURN (-EINVAL);
+ CERROR("Can't inspect opcode\n");
+ RETURN(-EINVAL);
}
opc = *opcp;
- if (lustre_msg_swabbed (req->rq_reqmsg))
+ if (lustre_msg_swabbed(req->rq_reqmsg))
__swab32s(&opc);
DEBUG_REQ(D_INODE, req, "reint opt = %d", opc);
rc = lustre_pack_reply(req, info->mti_rep_buf_nr,
info->mti_rep_buf_size, NULL);
if (rc)
- RETURN (rc);
+ RETURN(rc);
rc = mdt_reint_internal(info, req, offset, NULL);
RETURN(rc);
}
if (req->rq_reqmsg->bufcount <= MDS_REQ_INTENT_IT_OFF) {
/* No intent was provided */
- info->mti_rep_buf_size[0] = sizeof(struct ldlm_reply);
+ info->mti_rep_buf_size[0] = sizeof(struct ldlm_reply);
rc = lustre_pack_reply(req, 1, info->mti_rep_buf_size, NULL);
LASSERT(rc == 0);
mdt_thread_info_fini(info);
/* XXX swab here to assert that an mds_open reint
* packet is following */
rep->lock_policy_res2 = mdt_reint_internal(info, req,
- offset, &lockh);
+ offset, &lockh);
#if 0
/* We abort the lock if the lookup was negative and
* we did not make it to the OPEN portion */
* the client instead of whatever lock it was about to get. */
if (new_lock == NULL)
new_lock = ldlm_handle2lock(&lockh.mlh_lh);
- if (new_lock == NULL && (flags & LDLM_FL_INTENT_ONLY))
+ if (new_lock == NULL && (flags & LDLM_FL_INTENT_ONLY)) {
+ mdt_thread_info_fini(info);
RETURN(0);
+ }
LASSERTF(new_lock != NULL, "op "LPX64" lockh "LPX64"\n",
it->opc, lockh.mlh_lh.cookie);
* reconstructed a reply. */
LASSERT(lustre_msg_get_flags(req->rq_reqmsg) &
MSG_RESENT);
+ mdt_thread_info_fini(info);
RETURN(ELDLM_LOCK_REPLACED);
}
LDLM_LOCK_PUT(new_lock);
l_unlock(&new_lock->l_resource->lr_namespace->ns_lock);
+ mdt_thread_info_fini(info);
RETURN(ELDLM_LOCK_REPLACED);
}
/* NB don't lustre_swab_reqbuf() here. We're just taking a peek
* and we want to leave it to the specific unpacker once we've
* identified the message type */
- opcodep = lustre_msg_buf (req->rq_reqmsg, offset, sizeof (*opcodep));
+ opcodep = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*opcodep));
if (opcodep == NULL)
RETURN(-EFAULT);
opcode = *opcodep;
- if (lustre_msg_swabbed (req->rq_reqmsg))
+ if (lustre_msg_swabbed(req->rq_reqmsg))
__swab32s (&opcode);
if (opcode >= REINT_MAX || mdt_reint_unpackers[opcode] == NULL) {