md-cluster: only call complete(&cinfo->completion) when node join cluster
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 10 Jul 2015 09:01:21 +0000 (17:01 +0800)
committerNeilBrown <neilb@suse.com>
Mon, 31 Aug 2015 17:42:31 +0000 (19:42 +0200)
commiteece075cda38f55fc5829b5f9ec5fb919c561d81
tree05d178e80b53e1fbda2544d45c9372bb3de53e04
parent6e6d9f2cda47745a3abcb6609b1dee0e831161d8
md-cluster: only call complete(&cinfo->completion) when node join cluster

Introduce MD_CLUSTER_BEGIN_JOIN_CLUSTER flag to make sure
complete(&cinfo->completion) is only be invoked when node
join cluster. Otherwise node failure could also call the
complete, and it doesn't make sense to do it.

Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md-cluster.c