From: Hongchao Zhang Date: Mon, 6 Mar 2023 13:17:10 +0000 (-0500) Subject: LU-16629 osd: refill the existing env X-Git-Tag: 2.15.55~50 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F70%2F50270%2F2;p=fs%2Flustre-release.git 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. Change-Id: Ibae978a5a10826c2e3186012911870ce7bf0b147 Signed-off-by: Hongchao Zhang Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50270 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_io.c b/lustre/mdt/mdt_io.c index fa72341..3e86539 100644 --- a/lustre/mdt/mdt_io.c +++ b/lustre/mdt/mdt_io.c @@ -1938,6 +1938,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);