From patchwork Mon Oct 23 10:40:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhi Yong Wu X-Patchwork-Id: 829223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yLCcf1mMTz9t5C for ; Mon, 23 Oct 2017 21:41:22 +1100 (AEDT) Received: from localhost ([::1]:37941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aAa-0003V5-BK for incoming@patchwork.ozlabs.org; Mon, 23 Oct 2017 06:41:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aAE-0003Ux-Dh for qemu-devel@nongnu.org; Mon, 23 Oct 2017 06:40:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6aAA-0003F9-9Q for qemu-devel@nongnu.org; Mon, 23 Oct 2017 06:40:58 -0400 Received: from m97106.mail.qiye.163.com ([220.181.97.106]:53118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aA9-0003AQ-EX for qemu-devel@nongnu.org; Mon, 23 Oct 2017 06:40:54 -0400 Received: from zhiyong.wu$ucloud.cn ( [106.38.57.250] ) by ajax-webmail-wmsvr3 (Coremail) ; Mon, 23 Oct 2017 18:40:47 +0800 (CST) X-Originating-IP: [106.38.57.250] Date: Mon, 23 Oct 2017 18:40:47 +0800 (CST) From: "Zhi Yong Wu" To: qemu-devel@nongnu.org X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20150911(74783.7961) Copyright (c) 2002-2017 www.mailtech.cn 163-hosting MIME-Version: 1.0 Message-ID: <4b7f4023.1a1fb.15f48d21004.Coremail.zhiyong.wu@ucloud.cn> X-CM-TRANSID: auCowEBZmkYvx+1ZjS5GAA--.116W X-CM-SenderInfo: 52kl501qjo43w6xfz0lxgou0/1tbiVQ96CFf4o0UxcAAAsg X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 220.181.97.106 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wuzhiyong Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From 4439e5853f98fb4b32f346245a46414d3c7e2221 Mon Sep 17 00:00:00 2001 From: Zhi Yong Wu Date: Tue, 24 Oct 2017 03:19:00 +0800 Subject: [PATCH] COLO: remove the operation to clear connection list When hash table is created with g_hash_table_new_full(), the free function has been registered. So it isn't necessary since g_hash_table_remove_all() will call connection_destroy() for each connection struct automatically. Signed-off-by: Zhi Yong Wu --- net/colo.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/net/colo.c b/net/colo.c index 28ce7c8..668abb7 100644 --- a/net/colo.c +++ b/net/colo.c @@ -197,12 +197,6 @@ Connection *connection_get(GHashTable *connection_track_table, trace_colo_proxy_main("colo proxy connection hashtable full," " clear it"); connection_hashtable_reset(connection_track_table); - /* - * clear the conn_list - */ - while (!g_queue_is_empty(conn_list)) { - connection_destroy(g_queue_pop_head(conn_list)); - } } g_hash_table_insert(connection_track_table, new_key, conn);