diff options
author | Joel Becker | 2007-02-03 12:14:30 +0100 |
---|---|---|
committer | Mark Fasheh | 2007-03-14 22:37:09 +0100 |
commit | c24f72cc7ca829bbad0532ddf315ace3ae1c359e (patch) | |
tree | f52e199ba3e426d0713be8d401a1c53336f47b8b /fs/ocfs2/cluster/heartbeat.c | |
parent | [PATCH] paravirt: re-enable COMPAT_VDSO (diff) | |
download | kernel-qcow2-linux-c24f72cc7ca829bbad0532ddf315ace3ae1c359e.tar.gz kernel-qcow2-linux-c24f72cc7ca829bbad0532ddf315ace3ae1c359e.tar.xz kernel-qcow2-linux-c24f72cc7ca829bbad0532ddf315ace3ae1c359e.zip |
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/heartbeat.c')
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 5a9779bb9236..0f2cfecd42c0 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -1682,7 +1682,7 @@ out: } EXPORT_SYMBOL_GPL(o2hb_register_callback); -int o2hb_unregister_callback(struct o2hb_callback_func *hc) +void o2hb_unregister_callback(struct o2hb_callback_func *hc) { BUG_ON(hc->hc_magic != O2HB_CB_MAGIC); @@ -1690,15 +1690,13 @@ int o2hb_unregister_callback(struct o2hb_callback_func *hc) __builtin_return_address(0), hc); if (list_empty(&hc->hc_item)) - return 0; + return; down_write(&o2hb_callback_sem); list_del_init(&hc->hc_item); up_write(&o2hb_callback_sem); - - return 0; } EXPORT_SYMBOL_GPL(o2hb_unregister_callback); |