summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-helpers.c
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2019-08-01 16:20:33 -0400
committerAmar Tumballi <amarts@redhat.com>2019-08-14 03:21:59 +0000
commitd79de9976ea4332aa8f7bba4e27b0f578bb81cf0 (patch)
tree0902fbb52dcec1e1ef91707230a67cf84d76cc22 /xlators/storage/posix/src/posix-helpers.c
parent6ef9ffea7fee43ea6f59c8c36fd183f90e9c26f8 (diff)
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 <rtalur@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 43d7645..688a60b 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;
}