- if (unlikely(IS_ERR(child)))
- GOTO(out_parent, rc = PTR_ERR(child));
- if (is_resent) {
- /* Do not take lock for resent case. */
- lock = ldlm_handle2lock(&lhc->mlh_reg_lh);
- LASSERTF(lock != NULL, "Invalid lock handle "LPX64"\n",
- lhc->mlh_reg_lh.cookie);
-
- res_id = &lock->l_resource->lr_name;
- if (!fid_res_name_eq(mdt_object_fid(child),
- &lock->l_resource->lr_name)) {
- LASSERTF(fid_res_name_eq(mdt_object_fid(parent),
- &lock->l_resource->lr_name),
- "Lock res_id: %lu/%lu/%lu, Fid: "DFID".\n",
- (unsigned long)res_id->name[0],
- (unsigned long)res_id->name[1],
- (unsigned long)res_id->name[2],
- PFID(mdt_object_fid(parent)));
- CWARN("Although resent, but still not get child lock"
- "parent:"DFID" child:"DFID"\n",
- PFID(mdt_object_fid(parent)),
- PFID(mdt_object_fid(child)));
- lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
- LDLM_LOCK_PUT(lock);
- GOTO(relock, 0);
- }
- LDLM_LOCK_PUT(lock);
- rc = 0;
- } else {
+ if (unlikely(IS_ERR(child)))
+ GOTO(out_parent, rc = PTR_ERR(child));
+ if (is_resent) {
+ /* Do not take lock for resent case. */
+ lock = ldlm_handle2lock(&lhc->mlh_reg_lh);
+ LASSERTF(lock != NULL, "Invalid lock handle "LPX64"\n",
+ lhc->mlh_reg_lh.cookie);
+
+ res_id = &lock->l_resource->lr_name;
+ if (!fid_res_name_eq(mdt_object_fid(child),
+ &lock->l_resource->lr_name)) {
+ LASSERTF(fid_res_name_eq(mdt_object_fid(parent),
+ &lock->l_resource->lr_name),
+ "Lock res_id: "DLDLMRES", fid: "DFID"\n",
+ PLDLMRES(lock->l_resource),
+ PFID(mdt_object_fid(parent)));
+ CWARN("Although resent, but still not get child lock"
+ "parent:"DFID" child:"DFID"\n",
+ PFID(mdt_object_fid(parent)),
+ PFID(mdt_object_fid(child)));
+ lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
+ LDLM_LOCK_PUT(lock);
+ GOTO(relock, 0);
+ }
+ LDLM_LOCK_PUT(lock);
+ rc = 0;
+ } else {