Skip to content

Commit 5b0fb33

Browse files
GuoqingJiangshligit
authored andcommitted
md-cluster: unregister thread if err happened
The two threads need to be unregistered if a node can't join cluster successfully. Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
1 parent eb315cd commit 5b0fb33

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/md/md-cluster.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,8 @@ static int join(struct mddev *mddev, int nodes)
818818

819819
return 0;
820820
err:
821+
md_unregister_thread(&cinfo->recovery_thread);
822+
md_unregister_thread(&cinfo->recv_thread);
821823
lockres_free(cinfo->message_lockres);
822824
lockres_free(cinfo->token_lockres);
823825
lockres_free(cinfo->ack_lockres);

0 commit comments

Comments
 (0)