- /* lookup child object along with version checking */
- fid_zero(child_fid);
- rc = mdt_lookup_version_check(info, mp, &rr->rr_name, child_fid, 1);
- if (rc != 0) {
- /* Name might not be able to find during resend of
- * remote unlink, considering following case.
- * dir_A is a remote directory, the name entry of
- * dir_A is on MDT0, the directory is on MDT1,
- *
- * 1. client sends unlink req to MDT1.
- * 2. MDT1 sends name delete update to MDT0.
- * 3. name entry is being deleted in MDT0 synchronously.
- * 4. MDT1 is restarted.
- * 5. client resends unlink req to MDT1. So it can not
- * find the name entry on MDT0 anymore.
- * In this case, MDT1 only needs to destory the local
- * directory.
- */
- if (mdt_object_remote(mp) && rc == -ENOENT &&
- !fid_is_zero(rr->rr_fid2) &&
- lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) {
- no_name = 1;
- *child_fid = *rr->rr_fid2;
- } else {
- GOTO(unlock_parent, rc);
+ if (info->mti_spec.sp_cr_flags & MDS_OP_WITH_FID) {
+ *child_fid = *rr->rr_fid2;
+ } else {
+ /* lookup child object along with version checking */
+ fid_zero(child_fid);
+ rc = mdt_lookup_version_check(info, mp, &rr->rr_name, child_fid,
+ 1);
+ if (rc != 0) {
+ /* Name might not be able to find during resend of
+ * remote unlink, considering following case.
+ * dir_A is a remote directory, the name entry of
+ * dir_A is on MDT0, the directory is on MDT1,
+ *
+ * 1. client sends unlink req to MDT1.
+ * 2. MDT1 sends name delete update to MDT0.
+ * 3. name entry is being deleted in MDT0 synchronously.
+ * 4. MDT1 is restarted.
+ * 5. client resends unlink req to MDT1. So it can not
+ * find the name entry on MDT0 anymore.
+ * In this case, MDT1 only needs to destory the local
+ * directory.
+ */
+ if (mdt_object_remote(mp) && rc == -ENOENT &&
+ !fid_is_zero(rr->rr_fid2) &&
+ lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) {
+ no_name = 1;
+ *child_fid = *rr->rr_fid2;
+ } else {
+ GOTO(unlock_parent, rc);
+ }