- /* just local cancel (for stack clean up or eviction), don't
- * release quota space in this case */
- if ((lock->l_flags & LDLM_FL_LOCAL_ONLY) != 0) {
- lqe_putref(lqe);
- break;
- }
-
- /* allocate environment */
- OBD_ALLOC_PTR(env);
- if (env == NULL) {
- lqe_putref(lqe);
- rc = -ENOMEM;
- break;
- }
-
- /* initialize environment */
- rc = lu_env_init(env, LCT_DT_THREAD);
- if (rc) {
- OBD_FREE_PTR(env);
- lqe_putref(lqe);
- break;
- }
-