From 9d7d81e8058aa89fc24bcc211cfad3618720292d Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Thu, 22 Sep 2016 10:38:21 +0530 Subject: cluster/dht: remove unnecessary struct member Removed a structure member that was not used from dht_local_t. Skipped some unnecessary checks in dht_filter_loc_subvol_key. Change-Id: I81740b6528e063fb9cf5817e05865ff4d77aa748 BUG: 1378305 Signed-off-by: N Balachandran Reviewed-on: http://review.gluster.org/15542 Smoke: Gluster Build System Reviewed-by: Shyamsundar Ranganathan NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/cluster/dht/src/dht-common.h | 2 -- xlators/cluster/dht/src/dht-helper.c | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 3a66e3477df..7adc849fb63 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -265,8 +265,6 @@ struct dht_local { char xsel[256]; int32_t alloc_len; - char *newpath; - /* gfid related */ uuid_t gfid; diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 255c0823aac..a1210f1b273 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -304,8 +304,10 @@ dht_filter_loc_subvol_key (xlator_t *this, loc_t *loc, loc_t *new_loc, int ret = 0; /* not found */ /* Why do other tasks if first required 'char' itself is not there */ - if (!new_loc || !loc || !loc->name || !strchr (loc->name, '@')) - goto out; + if (!new_loc || !loc || !loc->name || !strchr (loc->name, '@')) { + /* Skip the GF_FREE checks here */ + return ret; + } trav = this->children; while (trav) { @@ -618,8 +620,6 @@ dht_local_wipe (xlator_t *this, dht_local_t *local) dht_lock_array_free (local->lock.locks, local->lock.lk_count); GF_FREE (local->lock.locks); - GF_FREE (local->newpath); - GF_FREE (local->key); if (local->rebalance.xdata) -- cgit