aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio-9p.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index f385183..cea3935 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -1877,14 +1877,15 @@ static void v9fs_flush(V9fsState *s, V9fsPDU *pdu)
static void v9fs_remove_post_remove(V9fsState *s, V9fsRemoveState *vs,
int err)
{
- /* For TREMOVE we need to clunk the fid even on failed remove */
- err = free_fid(s, vs->fidp->fid);
if (err < 0) {
- goto out;
+ err = -errno;
+ } else {
+ err = vs->offset;
}
- err = vs->offset;
-out:
+ /* 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);
}