Received: from eggs.gnu.org ([2001:4830:134:3::10]:56567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZbFm-0002ku-IK for qemu-devel@nongnu.org; Fri, 03 Feb 2017 05:38:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZbFk-0004IJ-07 for qemu-devel@nongnu.org; Fri, 03 Feb 2017 05:38:06 -0500 Received: from smtp3.mundo-r.com ([212.51.32.191]:6111 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZbFj-0004Fu-Ic for qemu-devel@nongnu.org; Fri, 03 Feb 2017 05:38:03 -0500 From: Alberto Garcia In-Reply-To: <1486116298-25046-3-git-send-email-pradeep.jagadeesh@huawei.com> References: <1486116298-25046-1-git-send-email-pradeep.jagadeesh@huawei.com> <1486116298-25046-3-git-send-email-pradeep.jagadeesh@huawei.com> Date: Fri, 03 Feb 2017 11:38:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/2 v15] throttle: factor out duplicate code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pradeep Jagadeesh , "Aneesh Kumar K.V" , Greg Kurz Cc: Pradeep Jagadeesh , qemu-devel@nongnu.org On Fri 03 Feb 2017 11:04:58 AM CET, Pradeep Jagadeesh wrote: > This patch removes the redundant throttle code that was present in > block and fsdev device files. Now the common code is moved to a single > file. Here it says that this patch moves common code to a separate file, however: > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > index 920eb05..22a6a99 100644 > --- a/hw/9pfs/9p.c > +++ b/hw/9pfs/9p.c > @@ -3532,7 +3532,6 @@ out: > if (s->ops && s->ops->cleanup && s->ctx.private) { > s->ops->cleanup(&s->ctx); > } > - fsdev_throttle_cleanup(s->ctx.fst); > g_free(s->tag); > g_free(s->ctx.fs_root); > v9fs_path_free(&path); > @@ -3545,6 +3544,7 @@ void v9fs_device_unrealize_common(V9fsState *s, Error **errp) > if (s->ops->cleanup) { > s->ops->cleanup(&s->ctx); > } > + fsdev_throttle_cleanup(s->ctx.fst); > g_free(s->tag); > g_free(s->ctx.fs_root); > } This doesn't belong here. In patch 1 you add a fsdev_throttle_cleanup() in v9fs_device_realize_common(), and in patch 2 you remove it from there and put it in v9fs_device_unrealize_common(). It looks like you wanted to fix patch 1 but added the fix to patch 2 instead. Berto