summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2016-05-02 18:33:11 +0300
committerShaohua Li <shli@fb.com>2016-05-04 22:39:35 +0300
commit5b0fb33e8aa1c8a94f763d1025445146412ca766 (patch)
treec4a6a7c0509a2a3b0dfad6ea91ca6e6d493b30ec /drivers/md
parenteb315cd0933b903126996e79c12cb1eae617a036 (diff)
downloadlinux-5b0fb33e8aa1c8a94f763d1025445146412ca766.tar.xz
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md-cluster.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index 0d4ddf85d607..76f88f731aa1 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -818,6 +818,8 @@ static int join(struct mddev *mddev, int nodes)
return 0;
err:
+ md_unregister_thread(&cinfo->recovery_thread);
+ md_unregister_thread(&cinfo->recv_thread);
lockres_free(cinfo->message_lockres);
lockres_free(cinfo->token_lockres);
lockres_free(cinfo->ack_lockres);