if (IS_ERR(handle))
RETURN(PTR_ERR(handle));
- if (likely(mdd_cobj != NULL))
- mdd_write_lock(env, mdd_cobj, DT_TGT_CHILD);
-
rc = mdd_declare_unlink(env, mdd, mdd_pobj, mdd_cobj,
lname, ma, handle, no_name, is_dir);
if (rc)
- GOTO(cleanup, rc);
+ GOTO(stop, rc);
rc = mdd_trans_start(env, mdd, handle);
if (rc)
- GOTO(cleanup, rc);
+ GOTO(stop, rc);
+
+ if (likely(mdd_cobj != NULL))
+ mdd_write_lock(env, mdd_cobj, DT_TGT_CHILD);
if (likely(no_name == 0) && !OBD_FAIL_CHECK(OBD_FAIL_LFSCK_DANGLING2)) {
rc = __mdd_index_delete(env, mdd_pobj, name, is_dir, handle);
lname, NULL, handle);
}
+stop:
rc = mdd_trans_stop(env, mdd, rc, handle);
return rc;
const struct lu_buf *buf;
int rc;
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
+ /* ldiskfs OSD needs this information for credit allocation */
+ if (def_acl_buf)
+ hint->dah_acl_len = def_acl_buf->lb_len;
+#endif
rc = mdd_declare_create_object_internal(env, p, c, attr, handle, spec,
hint);
if (rc)