From 187a81e6a72ea6274a0cd226d6e67a10fc947fb4 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Mon, 6 Mar 2023 08:17:10 -0500 Subject: [PATCH] LU-16629 osd: refill the existing env During the LDLM lock callback, the "lu_env" is created in ldlm_bl_thread_main, which is initiated by "ldlm_setup", and it could have no key of "osd_thread_info" yet, then it need to call "lu_env_refill" to refill the keys. Lustre-change: https://review.whamcloud.com/50270 Lustre-commit: TBD (from c9673c45a9c279b12ccb8804d54508905a1e79ee) Change-Id: Ibae978a5a10826c2e3186012911870ce7bf0b147 Signed-off-by: Hongchao Zhang Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50273 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/mdt/mdt_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/mdt/mdt_io.c b/lustre/mdt/mdt_io.c index 1ffa1e6..6c699bae 100644 --- a/lustre/mdt/mdt_io.c +++ b/lustre/mdt/mdt_io.c @@ -1720,6 +1720,9 @@ int ldlm_dom_discard_cp_ast(struct ldlm_lock *lock, __u64 flags, void *data) env = lu_env_find(); LASSERT(env); + + lu_env_refill(env); + mdt_object_put(env, mo); RETURN(0); -- 1.8.3.1