From 9080a49b75c2802f7739cb631050c8befa9ae760 Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Mon, 31 Dec 2018 13:52:27 +0530 Subject: [PATCH 498/498] mem-pool: Code refactor in mem_pool.c Problem: In the last commit 10868bfc5ed099a90fbfd2310bc89c299475d94e the patch was not complete according to upstream commit. Solution: Update some changes to match with an upstream patch. BUG: 1648893 > Signed-off-by: Mohit Agrawal > Reviewed-on: https://code.engineering.redhat.com/gerrit/159029 > Tested-by: RHGS Build Bot > Reviewed-by: Sunil Kumar Heggodu Gopala Acharya Change-Id: I924ba4967ce28ece6329dbda3e0309b79784fbe7 Signed-off-by: Mohit Agrawal Reviewed-on: https://code.engineering.redhat.com/gerrit/159628 Tested-by: RHGS Build Bot Reviewed-by: Niels de Vos Reviewed-by: Sunil Kumar Heggodu Gopala Acharya --- libglusterfs/src/mem-pool.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index 76daca9..7b62358 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -825,6 +825,7 @@ mem_get_from_pool (struct mem_pool *mem_pool) if (retval) { retval->magic = GF_MEM_HEADER_MAGIC; retval->next = NULL; + retval->pool = mem_pool; retval->pool_list = pool_list; retval->power_of_two = mem_pool->pool->power_of_two; } @@ -860,11 +861,6 @@ mem_get (struct mem_pool *mem_pool) return NULL; } - retval->magic = GF_MEM_HEADER_MAGIC; - retval->pool = mem_pool; - retval->pool_list = pool_list; - retval->power_of_two = mem_pool->pool->power_of_two; - GF_ATOMIC_INC (mem_pool->active); return retval + 1; -- 1.8.3.1