Whamcloud - gitweb
LU-12853 ptlrpc: zero session enviroment
[fs/lustre-release.git] / lustre / mgs / mgs_internal.h
index 8f19130..b7314a5 100644 (file)
@@ -316,18 +316,7 @@ extern struct lu_context_key mgs_thread_key;
 
 static inline struct mgs_thread_info *mgs_env_info(const struct lu_env *env)
 {
-       struct mgs_thread_info  *info;
-       int                     rc;
-
-       info = lu_context_key_get(&env->le_ctx, &mgs_thread_key);
-       if (info == NULL) {
-               rc = lu_env_refill((struct lu_env *)env);
-               if (rc != 0)
-                       return ERR_PTR(rc);
-               info = lu_context_key_get(&env->le_ctx, &mgs_thread_key);
-       }
-       LASSERT(info != NULL);
-       return info;
+       return lu_env_info(env, &mgs_thread_key);
 }
 
 extern const struct lu_device_operations mgs_lu_ops;