From d68e426263708334945dff69b88218ed71a48033 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Sat, 8 Jun 2019 01:22:27 +0300 Subject: 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 --- xlators/cluster/dht/src/dht-rebalance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index ea63c3c5e74..ab4b7715b66 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -4787,9 +4787,9 @@ out: dht_send_rebalance_event(this, defrag->cmd, defrag->defrag_status); + status = dict_new(); LOCK(&defrag->lock); { - status = dict_new(); gf_defrag_status_get(conf, status); if (ctx && ctx->notify) ctx->notify(GF_EN_DEFRAG_STATUS, status); -- cgit