[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [V2 03/25] [virtio-9p] Remove post functions for v9fs_r
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [V2 03/25] [virtio-9p] Remove post functions for v9fs_readlink. |
Date: |
Wed, 18 May 2011 10:27:26 +0100 |
On Tue, May 17, 2011 at 8:43 PM, Venkateswararao Jujjuri (JV)
<address@hidden> wrote:
> @@ -3621,8 +3605,13 @@ static void v9fs_readlink(void *opaque)
>
> v9fs_string_init(&vs->target);
> err = v9fs_do_readlink(s, &fidp->path, &vs->target);
> - v9fs_readlink_post_readlink(s, vs, err);
> - return;
> + if (err < 0) {
> + err = -errno;
> + goto out;
> + }
> + vs->offset += pdu_marshal(vs->pdu, vs->offset, "s", &vs->target);
> + err = vs->offset;
> + v9fs_string_free(&vs->target);
> out:
The vs->target string should be freed when v9fs_do_readlink() fails.
v9fs_do_readlink() *always* allocates vs->target.data, it doesn't free
it on error.
Stefan
- [Qemu-devel] [V2 0/25] Async threading for VirtFS using glib threads & coroutines., Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 05/25] [virtio-9p] Move errno into v9fs_do_readlink, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 03/25] [virtio-9p] Remove post functions for v9fs_readlink., Venkateswararao Jujjuri (JV), 2011/05/17
- Re: [Qemu-devel] [V2 03/25] [virtio-9p] Remove post functions for v9fs_readlink.,
Stefan Hajnoczi <=
- [Qemu-devel] [V2 09/25] hw/9pfs: Add yield support for readdir related coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 12/25] hw/9pfs: Update v9fs_statfs to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 14/25] hw/9pfs: Update v9fs_getattr to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 08/25] [virtio-9p] clean up v9fs_mkdir., Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 11/25] hw/9pfs: Add yield support to statfs coroutine, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 16/25] hw/9pfs: Update v9fs_setattr to use coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 13/25] hw/9pfs: Add yield support to lstat coroutine, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 18/25] hw/9pfs: Update v9fs_xattrwalk to coroutines, Venkateswararao Jujjuri (JV), 2011/05/17
- [Qemu-devel] [V2 07/25] [virtio-9p] Remove post functions for v9fs_mkdir., Venkateswararao Jujjuri (JV), 2011/05/17