From patchwork Thu Aug 25 16:28:02 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: 111620 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 AC403B6F9A for ; Fri, 26 Aug 2011 02:29:30 +1000 (EST) Received: from localhost ([::1]:60955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwco4-0006aS-7m for incoming@patchwork.ozlabs.org; Thu, 25 Aug 2011 12:29:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwcnv-0006WB-LX for qemu-devel@nongnu.org; Thu, 25 Aug 2011 12:29:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qwcnu-0001eb-IZ for qemu-devel@nongnu.org; Thu, 25 Aug 2011 12:29:19 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:50884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwcnt-0001e7-PW for qemu-devel@nongnu.org; Thu, 25 Aug 2011 12:29:18 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp07.au.ibm.com (8.14.4/8.13.1) with ESMTP id p7PGT4L1012318 for ; Fri, 26 Aug 2011 02:29:04 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7PGRc8r1437858 for ; Fri, 26 Aug 2011 02:27:44 +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 p7PGSvE7013373 for ; Fri, 26 Aug 2011 02:28:57 +1000 Received: from skywalker.ibm.com ([9.124.88.224]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p7PGStXC013015; Fri, 26 Aug 2011 02:28:56 +1000 From: "Aneesh Kumar K.V" To: qemu-devel@nongnu.org Date: Thu, 25 Aug 2011 21:58:02 +0530 Message-Id: <1314289682-19651-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 202.81.31.140 Cc: aliguori@us.ibm.com, "Aneesh Kumar K.V" Subject: [Qemu-devel] [PATCH] 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 94b7090..71bc51b 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -2106,6 +2106,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;