lu_context_exit(&th->th_ctx);
lu_context_fini(&th->th_ctx);
- thandle_put(th);
+ OBD_FREE_PTR(oh);
}
static struct thandle *osd_trans_create(const struct lu_env *env,
th->th_result = 0;
th->th_tags = LCT_TX_HANDLE;
oh->ot_credits = 0;
- atomic_set(&th->th_refc, 1);
- th->th_alloc_size = sizeof(*oh);
INIT_LIST_HEAD(&oh->ot_dcb_list);
osd_th_alloced(oh);
CERROR("%s: failed to stop transaction: rc = %d\n",
osd_name(osd), rc);
} else {
- thandle_put(&oh->ot_super);
+ OBD_FREE_PTR(oh);
}
/* inform the quota slave device that the transaction is stopping */