From: Guoqing Jiang Date: Fri, 12 Aug 2016 05:42:38 +0000 (+0800) Subject: md-cluster: clean related infos of cluster X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a7b0f1d51cd8928a6575e5a4f15d85bc46070919;p=deliverable%2Flinux.git md-cluster: clean related infos of cluster cluster_info and bitmap_info.nodes also need to be cleared when array is stopped. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li --- diff --git a/drivers/md/md.c b/drivers/md/md.c index b6ad04b58766..cd6797b3cdf7 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5454,12 +5454,14 @@ static void md_clean(struct mddev *mddev) mddev->degraded = 0; mddev->safemode = 0; mddev->private = NULL; + mddev->cluster_info = NULL; mddev->bitmap_info.offset = 0; mddev->bitmap_info.default_offset = 0; mddev->bitmap_info.default_space = 0; mddev->bitmap_info.chunksize = 0; mddev->bitmap_info.daemon_sleep = 0; mddev->bitmap_info.max_write_behind = 0; + mddev->bitmap_info.nodes = 0; } static void __md_stop_writes(struct mddev *mddev)