Skip to contentSkip to conversation

ocfs2: fix a redundant re-initialization

PATCH Applied Eric Ren 3 participants 3 messages May 23, 2016 OCFS2

lore
Share & tools
lore

Eric Ren

author
#0 lore raw

PATCH 1/1 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.

---
 fs/ocfs2/stackglue.c | 2 --
 1 file changed, 2 deletions(-)
fs/ocfs2/stackglue.c +0 -2
index 5d965e8..855fb44 100644
@@ -734,8 +734,6 @@ static void __exit ocfs2_stack_glue_exit(void)
 {
 	memset(&locking_max_version, 0,
 	       sizeof(struct ocfs2_protocol_version));
-	locking_max_version.pv_major = 0;
-	locking_max_version.pv_minor = 0;
 	ocfs2_sysfs_exit();
 	if (ocfs2_table_header)
 		unregister_sysctl_table(ocfs2_table_header);
Signature · 1 line
2.6.6
#1 lore raw

PATCH 1/1 ocfs2: fix a redundant re-initialization

Quoted 4 lines · Eric Ren

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

Looks good, thanks.

Quoted 18 lines
---
 fs/ocfs2/stackglue.c | 2 --
 1 file changed, 2 deletions(-)
fs/ocfs2/stackglue.c +0 -2
index 5d965e8..855fb44 100644
@@ -734,8 +734,6 @@ static void __exit ocfs2_stack_glue_exit(void)
 {
 	memset(&locking_max_version, 0,
 	       sizeof(struct ocfs2_protocol_version));
-	locking_max_version.pv_major = 0;
-	locking_max_version.pv_minor = 0;
 	ocfs2_sysfs_exit();
 	if (ocfs2_table_header)
 		unregister_sysctl_table(ocfs2_table_header);
#2 lore raw

PATCH 1/1 ocfs2: fix a redundant re-initialization

Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines · Eric Ren

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

Looks good, thanks.

Quoted 26 lines
Quoted 11 lines
---
 fs/ocfs2/stackglue.c | 2 --
 1 file changed, 2 deletions(-)
fs/ocfs2/stackglue.c +0 -0
index 5d965e8..855fb44 100644

fs/ocfs2/stackglue.c static void __exit ocfs2_stack_glue_exit(void) · line 739

Quoted 8 lines
fs/ocfs2/stackglue.c +0 -2
@@ -734,8 +734,6 @@ static void __exit ocfs2_stack_glue_exit(void)
 {
 	memset(&locking_max_version, 0,
 	       sizeof(struct ocfs2_protocol_version));
-	locking_max_version.pv_major = 0;
-	locking_max_version.pv_minor = 0;
 	ocfs2_sysfs_exit();
 	if (ocfs2_table_header)
 		unregister_sysctl_table(ocfs2_table_header);

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel