lu_device_put(lud);
th->th_dev = NULL;
- lu_context_exit(&th->th_ctx);
- lu_context_fini(&th->th_ctx);
OBD_FREE_PTR(oh);
EXIT;
/* add commit callback */
dmu_tx_callback_register(oh->ot_tx, osd_trans_commit_cb, oh);
oh->ot_assigned = 1;
- lu_context_init(&th->th_ctx, th->th_tags);
- lu_context_enter(&th->th_ctx);
lu_device_get(&d->dd_lu_dev);
}
th = &oh->ot_super;
th->th_dev = dt;
th->th_result = 0;
- th->th_tags = LCT_TX_HANDLE;
RETURN(th);
}
if (rc)
GOTO(err, rc);
+#ifdef ZFS_PROJINHERIT
+ if (dmu_objset_projectquota_enabled(o->od_os)) {
+ rc = __osd_obj2dnode(o->od_os, DMU_PROJECTUSED_OBJECT,
+ &o->od_projectused_dn);
+ if (rc && rc != -ENOENT)
+ GOTO(err, rc);
+ }
+#endif
+
/* 1. initialize oi before any file create or file open */
rc = osd_oi_init(env, o);
if (rc)
o->od_groupused_dn = NULL;
}
+#ifdef ZFS_PROJINHERIT
+ if (o->od_projectused_dn) {
+ osd_dnode_rele(o->od_projectused_dn);
+ o->od_projectused_dn = NULL;
+ }
+#endif
+
if (o->od_os != NULL) {
if (!o->od_dt_dev.dd_rdonly)
/* force a txg sync to get all commit callbacks */