hw/9pfs: Update the fidp path before opendir
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 26 May 2011 09:11:15 +0000 (14:41 +0530)
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 9 Sep 2011 09:15:53 +0000 (14:45 +0530)
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 <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs/virtio-9p.c

index 94b7090e7d082e9452018ac894751f99963f86c1..71bc51b3cae05e402e6537d3e3850cce81d18b9b 100644 (file)
@@ -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;