- memset(policy, 0, sizeof *policy);
- policy->l_inodebits.bits = MDS_INODELOCK_UPDATE;
-
- if (ss->ss_control_exp == NULL) {
- flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB;
-
- /*
- * Current node is controller, that is mdt0, where we should
- * take BFL lock.
- */
- rc = ldlm_cli_enqueue_local(ns, res_id, LDLM_IBITS, policy,
- LCK_EX, &flags, ldlm_blocking_ast,
- ldlm_completion_ast, NULL, NULL, 0,
- LVB_T_NONE,
- &info->mti_exp->exp_handle.h_cookie,
- lh);
- } else {
- struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_EX,
- ldlm_blocking_ast, ldlm_completion_ast, NULL, NULL, NULL };
-
- /*
- * This is the case mdt0 is remote node, issue DLM lock like
- * other clients.
- */
- rc = ldlm_cli_enqueue(ss->ss_control_exp, NULL, &einfo, res_id,
- policy, &flags, NULL, 0, LVB_T_NONE, lh,
- 0);
- }
-
+ memset(policy, 0, sizeof *policy);
+ policy->l_inodebits.bits = MDS_INODELOCK_UPDATE;
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 4, 53, 0)
+ /* In phase I, we will not do cross-rename, so local BFL lock would
+ * be enough
+ */
+ flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB;
+ /*
+ * Current node is controller, that is mdt0, where we should
+ * take BFL lock.
+ */
+ rc = ldlm_cli_enqueue_local(ns, res_id, LDLM_IBITS, policy,
+ LCK_EX, &flags, ldlm_blocking_ast,
+ ldlm_completion_ast, NULL, NULL, 0,
+ LVB_T_NONE,
+ &info->mti_exp->exp_handle.h_cookie,
+ lh);
+#else
+#warning "Local rename lock is invalid for DNE phase II."
+#endif