From 77107d8e78ffd952af7882a160c84012aea0e22b Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Thu, 10 Nov 2022 08:15:51 -0500 Subject: [PATCH] LU-16308 llite: wake_up after cl_object_kill cl_inode_fini() calls cl_object_kill() to set LU_OBJECT_HEARD_BANSHEE, and then calls cl_object_put_last() to wait for object refcount to become one, It should wake_up() in the middle in case someone is waiting on the flag. Signed-off-by: Lai Siyao Change-Id: I244db71ee4ed9c39118e443b99c3b8a3a0aa4bc3 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49130 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Neil Brown Reviewed-by: Zhenyu Xu Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/llite/lcommon_cl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/llite/lcommon_cl.c b/lustre/llite/lcommon_cl.c index dfc7edf..f38f34a 100644 --- a/lustre/llite/lcommon_cl.c +++ b/lustre/llite/lcommon_cl.c @@ -220,6 +220,11 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj) wq = lu_site_wq_from_fid(site, &header->loh_fid); + /* LU_OBJECT_HEARD_BANSHEE is set in cl_object_kill(), in case + * someone is waiting on this, wake up and then wait for object + * refcount becomes one. + */ + wake_up(wq); wait_event(*wq, atomic_read(&header->loh_ref) == 1); } -- 1.8.3.1