if (IS_ERR(child_tgt))
RETURN(PTR_ERR(child_tgt));
- rc = lmv_fid_alloc(NULL, exp, &target_fid, op_data);
+ if (!S_ISDIR(op_data->op_mode) && tp_tgt)
+ rc = __lmv_fid_alloc(lmv, &target_fid, tp_tgt->ltd_idx);
+ else
+ rc = lmv_fid_alloc(NULL, exp, &target_fid, op_data);
if (rc)
RETURN(rc);