From d79de9976ea4332aa8f7bba4e27b0f578bb81cf0 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Thu, 1 Aug 2019 16:20:33 -0400 Subject: posix: don't expect timer wheel to be inited Adding a timer to timer wheel should be done only after getting the timer wheel from the ctx using the function glusterfs_ctx_tw_get(). The function inits the wheel if not already done. Change-Id: I9692f84b822a02a9dc14725b7c11d26a2a634e94 Updates: #703 Signed-off-by: Raghavendra Talur --- xlators/storage/posix/src/posix-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 43d76453021..688a60b4b28 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -1507,7 +1507,7 @@ __posix_janitor_timer_start(xlator_t *this) timer->expires = priv->janitor_sleep_duration; timer->function = posix_janitor_task_initator; timer->data = this; - gf_tw_add_timer(this->ctx->tw->timer_wheel, timer); + gf_tw_add_timer(glusterfs_ctx_tw_get(this->ctx), timer); return; } -- cgit