* No permission check is needed.
*
* returns 1: if fid is ancestor of @mo;
- * returns 0: if fid is not a ancestor of @mo;
+ * returns 0: if fid is not an ancestor of @mo;
*
* returns EREMOTE if remote object is found, fid of remote object is saved to
* @fid;
name, handle);
if (rc != 0)
GOTO(out_put, rc);
-
- if (is_dir) {
- rc = mdo_ref_add(env, mdd_tobj, handle);
- if (rc != 0)
- GOTO(out_put, rc);
-
- }
}
rc = __mdd_index_delete(env, mdd_sobj, name, is_dir, handle);
if (rc != 0)
return rc;
+ rc = mdd_declare_links_add(env, mdd_tobj, handle, NULL, MLAO_IGNORE);
+ if (rc != 0)
+ return rc;
+
if (S_ISDIR(mdd_object_type(mdd_sobj))) {
rc = mdo_declare_ref_add(env, mdd_pobj, handle);
if (rc != 0)