[lustre-devel] [PATCH 07/42] lustre: llite: wake_up after cl_object_kill
James Simmons
jsimmons at infradead.org
Mon Jan 23 15:00:20 PST 2023
From: Lai Siyao <lai.siyao at whamcloud.com>
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.
WC-bug-id: https://jira.whamcloud.com/browse/LU-16308
Lustre-commit: 77107d8e78ffd952a ("LU-16308 llite: wake_up after cl_object_kill")
Signed-off-by: Lai Siyao <lai.siyao at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49130
Reviewed-by: Neil Brown <neilb at suse.de>
Reviewed-by: Zhenyu Xu <bobijam at hotmail.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/llite/lcommon_cl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/lustre/llite/lcommon_cl.c b/fs/lustre/llite/lcommon_cl.c
index f0d8f78fc82b..2735d5c164f8 100644
--- a/fs/lustre/llite/lcommon_cl.c
+++ b/fs/lustre/llite/lcommon_cl.c
@@ -229,6 +229,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);
}
--
2.27.0
More information about the lustre-devel
mailing list