Skip to content

Commit

Permalink
ocfs2: fix type conversion risk when get cluster attributes
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Joseph Qi <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Mark Fasheh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
josephhz authored and torvalds committed Apr 3, 2014
1 parent 8ed6b23 commit 41b63ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ocfs2/cluster/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,17 @@ static void o2net_update_recv_stats(struct o2net_sock_container *sc)

#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;
}
Expand Down

0 comments on commit 41b63ef

Please sign in to comment.