Skip to contentSkip to conversation

+ ocfs2-fix-type-conversion-risk-when-get-cluster-attributes.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Mar 19, 2014 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: + ocfs2-fix-type-conversion-risk-when-get-cluster-attributes.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 19 Mar 2014 13:57:34 -0700

The patch titled
Subject: ocfs2: fix type conversion risk when get cluster attributes
has been added to the -mm tree. Its filename is
ocfs2-fix-type-conversion-risk-when-get-cluster-attributes.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-fix-type-conversion-risk-when-get-cluster-attributes.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-fix-type-conversion-risk-when-get-cluster-attributes.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Joseph Qi <[email protected]>
Subject: ocfs2: fix type conversion risk when get cluster attributes

In o2nm_cluster, cl_idle_timeout_ms, cl_keepalive_delay_ms, as well as cl_reconnect_delay_ms, are defined as type of unsigned int. So we should also use unsigned int in the helper functions.

---

 fs/ocfs2/cluster/tcp.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/ocfs2/cluster/tcp.c renamed from fs/ocfs2/cluster/tcp.c~ocfs2-fix-type-conversion-risk-when-get-cluster-attributes +3 -3
diff -puN fs/ocfs2/cluster/tcp.c~ocfs2-fix-type-conversion-risk-when-get-cluster-attributes fs/ocfs2/cluster/tcp.c
@@ -262,17 +262,17 @@ static void o2net_update_recv_stats(stru
 
 #endif /* CONFIG_OCFS2_FS_STATS */
 
-static inline int o2net_reconnect_delay(void)
+static inline unsigned int o2net_reconnect_delay(void)
 {
 	return o2nm_single_cluster->cl_reconnect_delay_ms;
 }
 
-static inline int o2net_keepalive_delay(void)
+static inline unsigned int o2net_keepalive_delay(void)
 {
 	return o2nm_single_cluster->cl_keepalive_delay_ms;
 }
 
-static inline int o2net_idle_timeout(void)
+static inline unsigned int o2net_idle_timeout(void)
 {
 	return o2nm_single_cluster->cl_idle_timeout_ms;
 }

_

Patches currently in -mm which might be from [email protected] are

ocfs2-fix-null-pointer-dereference-when-access-dlm_state-before-launching-dlm-thread.patch ocfs2-remove-unused-variable-uuid_net_key-in-ocfs2_initialize_super.patch ocfs2-fix-a-tiny-race-when-running-dirop_fileop_racer.patch ocfs2-fix-type-conversion-risk-when-get-cluster-attributes.patch