summaryrefslogtreecommitdiff
path: root/fs/ocfs2/cluster/tcp.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2007-02-03 03:14:30 -0800
committerMark Fasheh <mark.fasheh@oracle.com>2007-03-14 14:37:09 -0700
commitc24f72cc7ca829bbad0532ddf315ace3ae1c359e (patch)
treef52e199ba3e426d0713be8d401a1c53336f47b8b /fs/ocfs2/cluster/tcp.c
parentc3442e296517aee733d62fc3fe03211598902c7d (diff)
ocfs2: Proper cleanup in case of error in ocfs2_register_hb_callbacks()
If ocfs2_register_hb_callbacks() succeeds on its first callback but fails its second, it doesn't release the first on the way out. Fix that. While we're at it, o2hb_unregister_callback() never returns anything but 0, so let's make it void. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/cluster/tcp.c')
-rw-r--r--fs/ocfs2/cluster/tcp.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 1718215fc018..69caf3e12fea 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -1638,17 +1638,8 @@ static void o2net_hb_node_up_cb(struct o2nm_node *node, int node_num,
void o2net_unregister_hb_callbacks(void)
{
- int ret;
-
- ret = o2hb_unregister_callback(&o2net_hb_up);
- if (ret < 0)
- mlog(ML_ERROR, "Status return %d unregistering heartbeat up "
- "callback!\n", ret);
-
- ret = o2hb_unregister_callback(&o2net_hb_down);
- if (ret < 0)
- mlog(ML_ERROR, "Status return %d unregistering heartbeat down "
- "callback!\n", ret);
+ o2hb_unregister_callback(&o2net_hb_up);
+ o2hb_unregister_callback(&o2net_hb_down);
}
int o2net_register_hb_callbacks(void)