diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-06-08 01:22:27 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-08-01 04:12:07 +0000 |
commit | d68e426263708334945dff69b88218ed71a48033 (patch) | |
tree | c9739c005f4531493593e07c60594b4ad6944794 /xlators/features/quiesce | |
parent | d7e449b0da35a30af876aef1bea1fb096d0c06dc (diff) |
Multiple files: get trivial stuff done before lock
Initialize a dictionary for example seems to be prefectly fine to be done
before taking a lock.
Change-Id: Ib29516c4efa8f0e2b526d512beab488fcd16d2e7
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/features/quiesce')
-rw-r--r-- | xlators/features/quiesce/src/quiesce.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/quiesce/src/quiesce.c b/xlators/features/quiesce/src/quiesce.c index 5b24f181eff..0e5eb60a16f 100644 --- a/xlators/features/quiesce/src/quiesce.c +++ b/xlators/features/quiesce/src/quiesce.c @@ -89,11 +89,12 @@ gf_quiesce_populate_failover_hosts(xlator_t *this, quiesce_priv_t *priv, if (!dup_val) goto out; + addr_tok = strtok_r(dup_val, ",", &save_ptr); LOCK(&priv->lock); { if (!list_empty(&priv->failover_list)) __gf_quiesce_cleanup_failover_hosts(this, priv); - addr_tok = strtok_r(dup_val, ",", &save_ptr); + while (addr_tok) { if (!valid_internet_address(addr_tok, _gf_true, _gf_false)) { gf_msg(this->name, GF_LOG_INFO, 0, QUIESCE_MSG_INVAL_HOST, |