md-cluster: call md_kick_rdev_from_array once ack failed
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 12 Aug 2016 05:42:34 +0000 (13:42 +0800)
committerShaohua Li <shli@fb.com>
Wed, 21 Sep 2016 16:09:44 +0000 (09:09 -0700)
commite566aef12a166732b7fd85897f8736ccf4fc7814
treec935ed99cd0f684f5fe62a450d4c10fc1e30d63c
parent7d1e042314619115153a0f6f06e4552c09a50e13
md-cluster: call md_kick_rdev_from_array once ack failed

The new_disk_ack could return failure if WAITING_FOR_NEWDISK
is not set, so we need to kick the dev from array in case
failure happened.

And we missed to check err before call new_disk_ack othwise
we could kick a rdev which isn't in array, thanks for the
reminder from Shaohua.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c