diff options
author | Mohit Agrawal <moagrawal@redhat.com> | 2018-08-24 10:44:59 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-27 03:24:50 +0000 |
commit | 30e46a9b3cef868e5c781044c99c3d5b066d4760 (patch) | |
tree | 596b0cd680d482467e2fb38c7f825f5c2cfabb3b /xlators/features/changetimerecorder/src/ctr-helper.h | |
parent | 57da742b13c85b5671be2638d7c9d1d31c5c93bb (diff) |
ctr: skip ctr xlator init if ctr is not enabled
Problem: If ctr xlator is not required it consumes
resources unnecessarily
Solution: Call ctr xlator init only while feature is enabled
Fixes: bz#1524323
Change-Id: I378113a390a286be20c4ade1b1bac170a8ef1b14
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'xlators/features/changetimerecorder/src/ctr-helper.h')
-rw-r--r-- | xlators/features/changetimerecorder/src/ctr-helper.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h index 9232c16c5a9..f4506115056 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.h +++ b/xlators/features/changetimerecorder/src/ctr-helper.h @@ -408,7 +408,7 @@ do {\ GF_ASSERT (this);\ GF_ASSERT (this->private);\ _priv = this->private;\ - if (!_priv->enabled)\ + if (!_priv->_db_conn)\ goto label;\ } while (0) |