diff --git a/fs/lustre/ptlrpc/service.c b/fs/lustre/ptlrpc/service.c index c874487..f65d5c5 100644 --- a/fs/lustre/ptlrpc/service.c +++ b/fs/lustre/ptlrpc/service.c @@ -2281,6 +2281,12 @@ static int ptlrpc_main(void *arg) ptlrpc_start_thread(svcpt, 0); } + /* reset le_ses to initial state */ + env->le_ses = NULL; + /* Refill the context before execution to make sure + * all thread keys are allocated + */ + lu_env_refill(env); /* Process all incoming reqs before handling any */ if (ptlrpc_server_request_incoming(svcpt)) { lu_context_enter(&env->le_ctx);