The o2hb_region struct is already zeroed by kzalloc(). It's redundant to
initialize reg->hr_region_num to 0.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
fs/ocfs2/cluster/heartbeat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 724350925aff..18150dabdff9 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -2011,7 +2011,6 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g
}
spin_lock(&o2hb_live_lock);
- reg->hr_region_num = 0;
if (o2hb_global_heartbeat_active()) {
reg->hr_region_num = find_first_zero_bit(o2hb_region_bitmap,
O2NM_MAX_REGIONS);
--
2.34.1