From patchwork Mon Jun 6 17:48:16 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: 99030 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 9F518B6FB2 for ; Tue, 7 Jun 2011 06:30:55 +1000 (EST) Received: from localhost ([::1]:60092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTgRo-0008Rj-04 for incoming@patchwork.ozlabs.org; Mon, 06 Jun 2011 16:30:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdut-0000Bg-OZ for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTdur-0003eK-Lj for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:48:43 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:36316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdur-0003e2-0J for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:48:41 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p56HltgD013951 for ; Tue, 7 Jun 2011 03:47:55 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p56HmQMf1314874 for ; Tue, 7 Jun 2011 03:48:26 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p56HmQHK002473 for ; Tue, 7 Jun 2011 03:48:26 +1000 Received: from skywalker.in.ibm.com ([9.79.216.200]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p56HmLuq002415; Tue, 7 Jun 2011 03:48:25 +1000 From: "Aneesh Kumar K.V" To: qemu-devel@nongnu.org Date: Mon, 6 Jun 2011 23:18:16 +0530 Message-Id: <1307382497-3737-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1307382497-3737-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1307382497-3737-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: 202.81.31.148 Cc: aliguori@us.ibm.com, "Aneesh Kumar K.V" Subject: [Qemu-devel] [PATCH 3/4] hw/9pfs: Update the fidp path before opendir 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 need to update the fidp path before opendir. Since we don't use the fid returned by mkdir, earlier code should not have much issue. We do a double v9fs_string_copy here. The later patch cleanup the entire function. Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 6b992f8..792b16a 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -2114,6 +2114,7 @@ static void v9fs_create(void *opaque) if (err < 0) { goto out; } + v9fs_string_copy(&fidp->path, &fullname); err = v9fs_co_opendir(pdu->s, fidp); if (err < 0) { goto out;