From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKcxs-0001IZ-0y for qemu-devel@nongnu.org; Thu, 12 May 2011 16:58:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKcxr-00020f-44 for qemu-devel@nongnu.org; Thu, 12 May 2011 16:58:31 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:37449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKcxq-00020a-UH for qemu-devel@nongnu.org; Thu, 12 May 2011 16:58:31 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e39.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4CKicBk005796 for ; Thu, 12 May 2011 14:44:38 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p4CKwNIL139386 for ; Thu, 12 May 2011 14:58:23 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4CEvull001124 for ; Thu, 12 May 2011 08:57:56 -0600 From: "Venkateswararao Jujjuri (JV)" Date: Thu, 12 May 2011 13:57:45 -0700 Message-Id: <1305233867-4367-24-git-send-email-jvrao@linux.vnet.ibm.com> In-Reply-To: <1305233867-4367-1-git-send-email-jvrao@linux.vnet.ibm.com> References: <1305233867-4367-1-git-send-email-jvrao@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 23/25] [virtio-9p] Remove post functions for v9fs_remove List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, "Venkateswararao Jujjuri (JV)" , stefanha@linux.vnet.ibm.com Signed-off-by: Venkateswararao Jujjuri " --- hw/9pfs/virtio-9p.c | 26 +++++++------------------- 1 files changed, 7 insertions(+), 19 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index e5112fe..dcce864 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -2612,22 +2612,6 @@ out: qemu_free(copdu); } -static void v9fs_remove_post_remove(V9fsState *s, V9fsRemoveState *vs, - int err) -{ - if (err < 0) { - err = -errno; - } else { - err = vs->offset; - } - - /* For TREMOVE we need to clunk the fid even on failed remove */ - free_fid(s, vs->fidp->fid); - - complete_pdu(s, vs->pdu, err); - qemu_free(vs); -} - static void v9fs_remove(void *opaque) { V9fsCoPdu *copdu = opaque; @@ -2648,11 +2632,15 @@ static void v9fs_remove(void *opaque) err = -EINVAL; goto out; } - err = v9fs_do_remove(s, &vs->fidp->path); - v9fs_remove_post_remove(s, vs, err); - return; + if (err < 0) { + err = -errno; + } else { + err = vs->offset; + } + /* For TREMOVE we need to clunk the fid even on failed remove */ + free_fid(s, vs->fidp->fid); out: complete_pdu(s, pdu, err); qemu_free(vs); -- 1.7.1