hw/9pfs: Use v9fs_do_close instead of close
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 18 May 2011 11:29:54 +0000 (16:59 +0530)
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 25 Aug 2011 14:46:42 +0000 (20:16 +0530)
we should use the local abstraction instead of
directly calling close.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs/virtio-9p.c

index 4ba2590566aa966baa802d5a6b0e546dfbcb1ba3..6529216e7d32e0b86c919ef2dd991a7c56da4319 100644 (file)
@@ -1592,7 +1592,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;
     }
@@ -2160,7 +2160,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;
     }