[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819032958.426932-1-liaoyuanhong@vivo.com>
Date: Tue, 19 Aug 2025 11:29:56 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>,
Joseph Qi <joseph.qi@...ux.alibaba.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Daniel Yang <danielyangkang@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Dmitry Antipov <dmantipov@...dex.ru>,
ocfs2-devel@...ts.linux.dev (open list:ORACLE CLUSTER FILESYSTEM 2 (OCFS2)),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] ocfs2: Remove redundant 0 value initialization
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@...o.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
Powered by blists - more mailing lists