From patchwork Mon Jun 6 17:16:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 99010 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6D174B6FB0 for ; Tue, 7 Jun 2011 05:18:23 +1000 (EST) Received: from localhost ([::1]:34038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTfJb-0006Qe-SR for incoming@patchwork.ozlabs.org; Mon, 06 Jun 2011 15:18:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdQO-0000Ru-1k for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:17:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTdQM-00050t-8k for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:17:11 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:54743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdQL-00050B-Bo for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:17:10 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp08.in.ibm.com (8.14.4/8.13.1) with ESMTP id p56H7UTm017358 for ; Mon, 6 Jun 2011 22:37:30 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p56HH6Td3903506 for ; Mon, 6 Jun 2011 22:47:06 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p56HH6cU020922 for ; Tue, 7 Jun 2011 03:17:06 +1000 Received: from skywalker.in.ibm.com ([9.79.216.200]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p56HH2cY020817; Tue, 7 Jun 2011 03:17:06 +1000 From: "Aneesh Kumar K.V" To: qemu-devel@nongnu.org Date: Mon, 6 Jun 2011 22:46:57 +0530 Message-Id: <1307380618-1963-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1307380618-1963-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1307380618-1963-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 122.248.162.8 Cc: aliguori@us.ibm.com, "Aneesh Kumar K.V" Subject: [Qemu-devel] [PATCH 5/6] hw/9pfs: Use v9fs_do_close instead of close 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 we should use the local abstraction instead of directly calling close. Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 21e07fb..d322814 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -1596,7 +1596,7 @@ static void v9fs_lcreate(void *opaque) if (err < 0) { fidp->fid_type = P9_FID_NONE; if (fidp->fs.fd > 0) { - close(fidp->fs.fd); + v9fs_co_close(pdu->s, fidp->fs.fd); } goto out; } @@ -2164,7 +2164,7 @@ static void v9fs_create(void *opaque) if (err < 0) { fidp->fid_type = P9_FID_NONE; if (fidp->fs.fd) { - close(fidp->fs.fd); + v9fs_co_close(pdu->s, fidp->fs.fd); } goto out; }