- if (le32_to_cpu(lmu->lum_stripe_count) < 2 && !pobj) {
- /*
- * lock parent because dir will be shrunk to be 1 stripe, which
- * should be converted to normal directory, but that will
- * change dir fid and update namespace of parent.
- */
- lhp = &info->mti_lh[MDT_LH_PARENT];
- mdt_lock_reg_init(lhp, LCK_PW);
-
- /* get parent from PFID */
- ma->ma_need |= MA_PFID;
- ma->ma_valid = 0;
- rc = mdt_attr_get_complex(info, obj, ma);
- if (rc)
- GOTO(unlock_obj, rc);
-
- if (!(ma->ma_valid & MA_PFID))
- GOTO(unlock_obj, rc = -ENOTSUPP);
-
- pobj = mdt_object_find(env, mdt, &ma->ma_pfid);
- if (IS_ERR(pobj)) {
- rc = PTR_ERR(pobj);
- pobj = NULL;
- GOTO(unlock_obj, rc);
- }
-
- mdt_reint_striped_unlock(info, obj, lhc, einfo, 1);
-
- if (mdt_object_remote(pobj)) {
- rc = mdt_remote_object_lock(info, pobj, rr->rr_fid1,
- &lhp->mlh_rreg_lh, LCK_EX,
- MDS_INODELOCK_LOOKUP,
- false);
- if (rc != ELDLM_OK) {
- mdt_object_put(env, pobj);
- GOTO(put_obj, rc);
- }
- mdt_object_unlock(info, NULL, lhp, 1);
- }
-
- rc = mdt_reint_object_lock(info, pobj, lhp,
- MDS_INODELOCK_UPDATE, true);
- if (rc) {
- mdt_object_put(env, pobj);
- GOTO(put_obj, rc);
- }
-
- goto relock;
- }
-