From patchwork Wed Oct 9 05:19:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 281716 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AACF52C0090 for ; Wed, 9 Oct 2013 16:20:44 +1100 (EST) Received: from localhost ([::1]:40231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTmCQ-00012y-NT for incoming@patchwork.ozlabs.org; Wed, 09 Oct 2013 01:20:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTmBh-0000xs-TJ for qemu-devel@nongnu.org; Wed, 09 Oct 2013 01:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTmBa-0007TY-H8 for qemu-devel@nongnu.org; Wed, 09 Oct 2013 01:19:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTmBa-0007TN-9A for qemu-devel@nongnu.org; Wed, 09 Oct 2013 01:19:50 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r995JnYp016675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Oct 2013 01:19:49 -0400 Received: from T430s.nay.redhat.com ([10.66.6.118]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r995JhPI011793; Wed, 9 Oct 2013 01:19:47 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 9 Oct 2013 13:19:38 +0800 Message-Id: <1381295983-18945-2-git-send-email-famz@redhat.com> In-Reply-To: <1381295983-18945-1-git-send-email-famz@redhat.com> References: <1381295983-18945-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v5 1/6] mirror: don't close target X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Let reference count manage target and don't call bdrv_close here. Signed-off-by: Fam Zheng --- block/mirror.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 7b95acf..01a795a 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -479,7 +479,6 @@ immediate_exit: } bdrv_swap(s->target, s->common.bs); } - bdrv_close(s->target); bdrv_unref(s->target); block_job_completed(&s->common, ret); }