-static void *mdt_txn_key_init(const struct lu_context *ctx,
- struct lu_context_key *key)
-{
- struct mdt_txn_info *txi;
-
- /*
- * check that no high order allocations are incurred.
- */
- CLASSERT(CFS_PAGE_SIZE >= sizeof *txi);
- OBD_ALLOC_PTR(txi);
- if (txi == NULL)
- txi = ERR_PTR(-ENOMEM);
- memset(txi, 0, sizeof(*txi));
- return txi;
-}
-
-static void mdt_txn_key_fini(const struct lu_context *ctx,
- struct lu_context_key *key, void *data)
-{
- struct mdt_txn_info *txi = data;
- OBD_FREE_PTR(txi);
-}