summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/changelog/lib/src/gf-changelog-journal-handler.c')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-journal-handler.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
index 2975b06757f..f07d341ddef 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
@@ -790,13 +790,16 @@ gf_changelog_init_processor (gf_changelog_journal_t *jnl)
goto cleanup_mutex;
INIT_LIST_HEAD (&jnl_proc->entries);
+ jnl_proc->waiting = _gf_false;
+ jnl->jnl_proc = jnl_proc;
+
ret = pthread_create (&jnl_proc->processor,
NULL, gf_changelog_process, jnl);
- if (ret != 0)
+ if (ret != 0) {
+ jnl->jnl_proc = NULL;
goto cleanup_cond;
- jnl_proc->waiting = _gf_false;
+ }
- jnl->jnl_proc = jnl_proc;
return 0;
cleanup_cond: