[PATCH 5/5] virtio_blk: simplify refcounting

2022-02-15 Thread Christoph Hellwig
Implement the ->free_disk method to free the virtio_blk structure only once the last gendisk reference goes away instead of keeping a local refcount. Signed-off-by: Christoph Hellwig Reviewed-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin --- drivers/block/virtio_blk.c | 66

Re: [PATCH 5/5] virtio_blk: simplify refcounting

2022-02-09 Thread Stefan Hajnoczi
On Wed, Feb 09, 2022 at 09:21:20AM +0100, Christoph Hellwig wrote: > Implement the ->free_disk method to free the virtio_blk structure only > once the last gendisk reference goes away instead of keeping a local > refcount. > > Signed-off-by: Christoph Hellwig > --- > drivers/block/virtio_blk.c

Re: [PATCH 5/5] virtio_blk: simplify refcounting

2022-02-09 Thread Michael S. Tsirkin
On Wed, Feb 09, 2022 at 09:21:20AM +0100, Christoph Hellwig wrote: > Implement the ->free_disk method to free the virtio_blk structure only > once the last gendisk reference goes away instead of keeping a local > refcount. > > Signed-off-by: Christoph Hellwig Acked-by: Michael S. Tsirkin >

[PATCH 5/5] virtio_blk: simplify refcounting

2022-02-09 Thread Christoph Hellwig
Implement the ->free_disk method to free the virtio_blk structure only once the last gendisk reference goes away instead of keeping a local refcount. Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 74 +++--- 1 file changed, 21 insertions(+), 53