PFID(mdt_object_fid(parent)), name, ldlm_rep);
mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_EXECD);
+
+ rc = mdt_object_exists(parent);
+ if (rc == 0)
+ RETURN(-ESTALE);
+ else if (rc < 0) {
+ CERROR("Object "DFID" locates on remote server\n",
+ PFID(mdt_object_fid(parent)));
+ LBUG();
+ }
+
if (strlen(name) == 0) {
/* Only getattr on the child. Parent is on another node. */
mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_POS);
GOTO(out, rc);
}
- rc = mdt_object_exists(parent);
- if (rc == 0)
- RETURN(-ESTALE);
- else if (rc < 0) {
- CERROR("Object "DFID" locates on remote server\n",
- PFID(mdt_object_fid(parent)));
- LBUG();
- }
-
/*step 1: lock parent */
lhp = &info->mti_lh[MDT_LH_PARENT];
lhp->mlh_mode = LCK_CR;