[PATCH 10/18] virtiofs: Do not use device managed mem for virtio_fs and virtio_fs_vq

Stefan Hajnoczi
2019-09-06T10:56:58Z

On Thu, Sep 05, 2019 at 03:48:51PM -0400, Vivek Goyal
wrote:
> These data structures should go away when virtio_fs object is going away.
> When deivce is going away, we need to just make sure virtqueues can go
> away and after that none of the code accesses vq and all the requests
> get error.
>
> So allocate memory for virtio_fs and virtio_fs_vq normally and free it
> at right time.
>
> This patch still frees up memory during device remove time. A later patch
> will make virtio_fs object reference counted and this memory will be
> freed when last reference to object is dropped.
>
> Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
> ---
>  fs/fuse/virtio_fs.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL:
<http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20190906/ee44eded/attachment.sig>