* [PATCH] ocfs2: properly clean task pointer before o2hb thread exits abnormally
@ 2022-11-25 3:15 lihongweizz
2022-11-25 9:28 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: lihongweizz @ 2022-11-25 3:15 UTC (permalink / raw)
To: mark, jlbec, joseph.qi; +Cc: ocfs2-devel, linux-kernel, Rock Li
From: Rock Li <lihongweizz@inspur.com>
in case o2hb thread exits abnormally before stop o2cb service,
heartbeat_drop_group_item will try to stop a noexit thread cause
ret->hb_task was not clear properly.
Signed-off-by: Rock Li <lihongweizz@inspur.com>
---
fs/ocfs2/cluster/heartbeat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index b13d344..9db448d 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1258,6 +1258,8 @@ static int o2hb_thread(void *data)
/* Unpin node */
o2nm_undepend_this_node();
+ reg->hr_task = NULL;
+
mlog(ML_HEARTBEAT|ML_KTHREAD, "o2hb thread exiting\n");
return 0;
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ocfs2: properly clean task pointer before o2hb thread exits abnormally
2022-11-25 3:15 [PATCH] ocfs2: properly clean task pointer before o2hb thread exits abnormally lihongweizz
@ 2022-11-25 9:28 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2022-11-25 9:28 UTC (permalink / raw)
To: lihongweizz, mark, jlbec; +Cc: ocfs2-devel, linux-kernel
On 11/25/22 11:15 AM, lihongweizz wrote:
> From: Rock Li <lihongweizz@inspur.com>
>
> in case o2hb thread exits abnormally before stop o2cb service,
> heartbeat_drop_group_item will try to stop a noexit thread cause
> ret->hb_task was not clear properly.
>
Could you please describe the scenario in detail?
Thanks,
Joseph
> Signed-off-by: Rock Li <lihongweizz@inspur.com>
> ---
> fs/ocfs2/cluster/heartbeat.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
> index b13d344..9db448d 100644
> --- a/fs/ocfs2/cluster/heartbeat.c
> +++ b/fs/ocfs2/cluster/heartbeat.c
> @@ -1258,6 +1258,8 @@ static int o2hb_thread(void *data)
> /* Unpin node */
> o2nm_undepend_this_node();
>
> + reg->hr_task = NULL;
> +
> mlog(ML_HEARTBEAT|ML_KTHREAD, "o2hb thread exiting\n");
>
> return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-25 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 3:15 [PATCH] ocfs2: properly clean task pointer before o2hb thread exits abnormally lihongweizz
2022-11-25 9:28 ` Joseph Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®