提交 191df2b5 编写于 作者: E Eric Ren 提交者: Linus Torvalds

ocfs2: fix a redundant re-initialization

Obviously, memset() has zeroed the whole struct locking_max_version.
So, it's no need to zero its two fields individually.

Link: http://lkml.kernel.org/r/1463970605-18354-1-git-send-email-zren@suse.comSigned-off-by: NEric Ren <zren@suse.com>
Reviewed-by: NJoseph Qi <joseph.qi@huawei.com>
Reviewed-by: NGang He <ghe@suse.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 17359a80
...@@ -735,8 +735,6 @@ static void __exit ocfs2_stack_glue_exit(void) ...@@ -735,8 +735,6 @@ static void __exit ocfs2_stack_glue_exit(void)
{ {
memset(&locking_max_version, 0, memset(&locking_max_version, 0,
sizeof(struct ocfs2_protocol_version)); sizeof(struct ocfs2_protocol_version));
locking_max_version.pv_major = 0;
locking_max_version.pv_minor = 0;
ocfs2_sysfs_exit(); ocfs2_sysfs_exit();
if (ocfs2_table_header) if (ocfs2_table_header)
unregister_sysctl_table(ocfs2_table_header); unregister_sysctl_table(ocfs2_table_header);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册