[lustre-devel] [PATCH 07/42] lustre: llite: wake_up after cl_object_kill
James Simmons <[email protected]>
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Lai Siyao <[email protected]> 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 <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49130 Reviewed-by: Neil Brown <[email protected]> Reviewed-by: Zhenyu Xu <[email protected]> Reviewed-by: James Simmons <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> --- 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 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org