diff mbox series

[07/42] lustre: llite: wake_up after cl_object_kill

Message ID 1674514855-15399-8-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to OpenSFS tree as of Jan 22 2023 | expand

Commit Message

James Simmons Jan. 23, 2023, 11 p.m. UTC
From: Lai Siyao <lai.siyao@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@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49130
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/llite/lcommon_cl.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

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);
 	}