From d7ce8331a146aff84f8d222bc93c7af610707540 Mon Sep 17 00:00:00 2001 From: Barak Sason Rofman Date: Thu, 24 Sep 2020 12:34:23 +0300 Subject: DHT - fixing a bug in thread creation The 3rd argument of gf_thread_create is a pointer to a method, however in this case, a pointer to a pointer to a method is passed (2 levels of indirection instead of 1). Change-Id: Ic2d4ea75aa54c6bc85a80bd0277a0efa5e5814ad updates: #1002 Signed-off-by: Barak Sason Rofman --- xlators/cluster/dht/src/dht-rebalance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 358e1c6d533..e901947d0ff 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -4252,7 +4252,7 @@ gf_defrag_estimates_init(xlator_t *this, loc_t *loc, pthread_t *filecnt_thread) goto out; } - ret = gf_thread_create(filecnt_thread, NULL, &dht_file_counter_thread, + ret = gf_thread_create(filecnt_thread, NULL, dht_file_counter_thread, (void *)defrag, "dhtfcnt"); if (ret) { @@ -4309,7 +4309,7 @@ gf_defrag_parallel_migration_init(xlator_t *this, gf_defrag_info_t *defrag, /*Spawn Threads Here*/ while (index < thread_spawn_count) { - ret = gf_thread_create(&(tid[index]), NULL, &gf_defrag_task, + ret = gf_thread_create(&(tid[index]), NULL, gf_defrag_task, (void *)defrag, "dhtmig%d", (index + 1) & 0x3ff); if (ret != 0) { gf_msg("DHT", GF_LOG_ERROR, ret, 0, "Thread[%d] creation failed. ", -- cgit