diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c
index 1ea3b9fdc1..f2a994c707 100644
--- a/lustre/ptlrpc/client.c
+++ b/lustre/ptlrpc/client.c
@@ -2327,7 +2327,9 @@ int ptlrpc_set_wait(const struct lu_env *env, struct ptlrpc_request_set *set)
struct list_head *tmp;
struct ptlrpc_request *req;
struct l_wait_info lwi;
+#if 0
struct lu_env _env;
+#endif
time64_t timeout;
int rc;
ENTRY;
@@ -2345,6 +2347,7 @@ int ptlrpc_set_wait(const struct lu_env *env, struct ptlrpc_request_set *set)
if (list_empty(&set->set_requests))
RETURN(0);
+#if 0
/* ideally we want env provide by the caller all the time,
* but at the moment that would mean a massive change in
* LDLM while benefits would be close to zero, so just
@@ -2356,6 +2359,7 @@ int ptlrpc_set_wait(const struct lu_env *env, struct ptlrpc_request_set *set)
RETURN(rc);
env = &_env;
}
+#endif
do {
timeout = ptlrpc_set_next_timeout(set);
@@ -2436,8 +2440,10 @@ int ptlrpc_set_wait(const struct lu_env *env, struct ptlrpc_request_set *set)
rc = req->rq_status;
}
+#if 0
if (env && env == &_env)
lu_env_fini(&_env);
+#endif
RETURN(rc);
}
Thanks Andrew!