]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix BUG when o2hb_register_callback fails
authorJoseph Qi <joseph.qi@huawei.com>
Fri, 4 Sep 2015 22:43:57 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
commit0bb4a4b834daa26162644e42338d3e01c814ff9c
tree532e1e35441127420684b66e0b17788f2ba3b56f
parentfa1ff62e3fae981a3e7ecd6d63d62c6a7837af8b
ocfs2: fix BUG when o2hb_register_callback fails

In dlm_register_domain_handlers, if o2hb_register_callback fails, it
will call dlm_unregister_domain_handlers to unregister.  This will
trigger the BUG_ON in o2hb_unregister_callback because hc_magic is 0.
So we should call o2hb_setup_callback to initialize hc first.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmdomain.c