md: Fix stray --cluster-confirm crash
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Mon, 2 Mar 2015 16:55:49 +0000 (10:55 -0600)
committerNeilBrown <neilb@suse.de>
Fri, 20 Mar 2015 23:33:00 +0000 (10:33 +1100)
commitfa8259da0e10b189e41ee60907ec2a499bb66019
tree68805b72831656cdcb2d13f3b4c8ee393104e2bd
parent3b0e6aacbfe04fa144c4732f269b09ce91177566
md: Fix stray --cluster-confirm crash

A --cluster-confirm without an --add (by another node) can
crash the kernel.

Fix it by guarding it using a state.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md-cluster.c
drivers/md/md-cluster.h
drivers/md/md.c