From 006000566d4e95b8d1924addfb41094acf0d5ec2 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 29 Jan 2008 00:11:41 +0200 Subject: [2.6 patch] fs/ocfs2/: possible cleanups This patch contains the following cleanups that are now possible: - make the following needlessly global functions static: - dlmglue.c:ocfs2_process_blocked_lock() - heartbeat.c:ocfs2_node_map_init() - #if 0 the following unused global function plus support functions: - heartbeat.c:ocfs2_node_map_is_only() Signed-off-by: Adrian Bunk Signed-off-by: Mark Fasheh --- fs/ocfs2/heartbeat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'fs/ocfs2/heartbeat.c') diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index c0efd9489fe..0758daf64da 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c @@ -49,10 +49,15 @@ static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, int bit); static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); -static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, - struct ocfs2_node_map *from); -static void __ocfs2_node_map_set(struct ocfs2_node_map *target, - struct ocfs2_node_map *from); + +/* special case -1 for now + * TODO: should *really* make sure the calling func never passes -1!! */ +static void ocfs2_node_map_init(struct ocfs2_node_map *map) +{ + map->num_nodes = OCFS2_NODE_MAP_MAX_NODES; + memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * + sizeof(unsigned long)); +} void ocfs2_init_node_maps(struct ocfs2_super *osb) { @@ -136,15 +141,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb) mlog_errno(ret); } -/* special case -1 for now - * TODO: should *really* make sure the calling func never passes -1!! */ -void ocfs2_node_map_init(struct ocfs2_node_map *map) -{ - map->num_nodes = OCFS2_NODE_MAP_MAX_NODES; - memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * - sizeof(unsigned long)); -} - static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, int bit) { @@ -216,6 +212,8 @@ int ocfs2_node_map_is_empty(struct ocfs2_super *osb, return ret; } +#if 0 + static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, struct ocfs2_node_map *from) { @@ -254,6 +252,8 @@ static void __ocfs2_node_map_set(struct ocfs2_node_map *target, target->map[i] = from->map[i]; } +#endif /* 0 */ + /* Returns whether the recovery bit was actually set - it may not be * if a node is still marked as needing recovery */ int ocfs2_recovery_map_set(struct ocfs2_super *osb, -- cgit v1.2.3