diff options
Diffstat (limited to 'fs/ocfs2/heartbeat.c')
-rw-r--r-- | fs/ocfs2/heartbeat.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index 8fc52d6d0ce7..b25ef63781ba 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c | |||
@@ -164,8 +164,10 @@ int ocfs2_register_hb_callbacks(struct ocfs2_super *osb) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | status = o2hb_register_callback(&osb->osb_hb_up); | 166 | status = o2hb_register_callback(&osb->osb_hb_up); |
167 | if (status < 0) | 167 | if (status < 0) { |
168 | mlog_errno(status); | 168 | mlog_errno(status); |
169 | o2hb_unregister_callback(&osb->osb_hb_down); | ||
170 | } | ||
169 | 171 | ||
170 | bail: | 172 | bail: |
171 | return status; | 173 | return status; |
@@ -173,18 +175,11 @@ bail: | |||
173 | 175 | ||
174 | void ocfs2_clear_hb_callbacks(struct ocfs2_super *osb) | 176 | void ocfs2_clear_hb_callbacks(struct ocfs2_super *osb) |
175 | { | 177 | { |
176 | int status; | ||
177 | |||
178 | if (ocfs2_mount_local(osb)) | 178 | if (ocfs2_mount_local(osb)) |
179 | return; | 179 | return; |
180 | 180 | ||
181 | status = o2hb_unregister_callback(&osb->osb_hb_down); | 181 | o2hb_unregister_callback(&osb->osb_hb_down); |
182 | if (status < 0) | 182 | o2hb_unregister_callback(&osb->osb_hb_up); |
183 | mlog_errno(status); | ||
184 | |||
185 | status = o2hb_unregister_callback(&osb->osb_hb_up); | ||
186 | if (status < 0) | ||
187 | mlog_errno(status); | ||
188 | } | 183 | } |
189 | 184 | ||
190 | void ocfs2_stop_heartbeat(struct ocfs2_super *osb) | 185 | void ocfs2_stop_heartbeat(struct ocfs2_super *osb) |