aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuoqing Jiang2015-10-12 17:21:24 +0800
committerGoldwyn Rodrigues2015-10-12 11:58:15 -0500
commitaee177ac5a4225ac4eeed0aa5edf2338c2d713a4 (patch)
tree7ed0f51a4e9157669839b9c10787a31fb8a55768
parent256f5b245aab93bfa2d8b86d66545fceea05408e (diff)
md-cluster: zero cmsg before it was sent
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
-rw-r--r--drivers/md/md-cluster.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index 8bddd7882292..c7b8027cebdd 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -882,7 +882,7 @@ static int resync_start(struct mddev *mddev)
static int resync_info_update(struct mddev *mddev, sector_t lo, sector_t hi)
{
struct md_cluster_info *cinfo = mddev->cluster_info;
- struct cluster_msg cmsg;
+ struct cluster_msg cmsg = {0};
add_resync_info(mddev, cinfo->bitmap_lockres, lo, hi);
/* Re-acquire the lock to refresh LVB */
@@ -982,7 +982,7 @@ static int new_disk_ack(struct mddev *mddev, bool ack)
static int remove_disk(struct mddev *mddev, struct md_rdev *rdev)
{
- struct cluster_msg cmsg;
+ struct cluster_msg cmsg = {0};
struct md_cluster_info *cinfo = mddev->cluster_info;
cmsg.type = cpu_to_le32(REMOVE);
cmsg.raid_slot = cpu_to_le32(rdev->desc_nr);
@@ -993,7 +993,7 @@ static int gather_bitmaps(struct md_rdev *rdev)
{
int sn, err;
sector_t lo, hi;
- struct cluster_msg cmsg;
+ struct cluster_msg cmsg = {0};
struct mddev *mddev = rdev->mddev;
struct md_cluster_info *cinfo = mddev->cluster_info;