Whamcloud - gitweb
LU-4257 obdclass: Get rid of cl_env hash table
[fs/lustre-release.git] / lustre / llite / lcommon_misc.c
index 80ce42e..47178ef 100644 (file)
@@ -168,13 +168,11 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
                return rc;
        }
 
-       lg->lg_env = cl_env_get(&refcheck);
+       lg->lg_env = env;
        lg->lg_io = io;
        lg->lg_lock = lock;
        lg->lg_gid = gid;
-       LASSERT(lg->lg_env == env);
 
-       cl_env_unplant(env, &refcheck);
        return 0;
 }
 
@@ -183,14 +181,10 @@ void cl_put_grouplock(struct ll_grouplock *lg)
        struct lu_env  *env  = lg->lg_env;
        struct cl_io   *io   = lg->lg_io;
        struct cl_lock *lock = lg->lg_lock;
-       __u16             refcheck;
 
        LASSERT(lg->lg_env != NULL);
        LASSERT(lg->lg_gid != 0);
 
-       cl_env_implant(env, &refcheck);
-       cl_env_put(env, &refcheck);
-
        cl_lock_release(env, lock);
        cl_io_fini(env, io);
        cl_env_put(env, NULL);