search for: mempool_destroy

Displaying 20 results from an estimated 64 matches for "mempool_destroy".

2020 Jul 09
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On 09/07/20 17:06, Xianting Tian wrote: > kmem_cache_destroy and mempool_destroy can correctly handle > null pointer parameter, so there is no need to check if the > parameter is null before calling kmem_cache_destroy and > mempool_destroy. > > Signed-off-by: Xianting Tian <xianting_tian at 126.com> > --- > drivers/scsi/virtio_scsi.c | 12 ++++------...
2011 Apr 05
3
[PATCH] virtio_blk: decrement index when blockdevice is removed
...akuma Umeya <tumeya at redhat.com> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 6ecf89c..730e7af 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -489,6 +489,7 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) mempool_destroy(vblk->pool); vdev->config->del_vqs(vdev); kfree(vblk); + index--; } static const struct virtio_device_id id_table[] = { -- Umeya, Takuma Technical Account Manager Red Hat GSS APAC +81.3.5798.8584 (direct) tumeya at redhat.com
2011 Apr 05
3
[PATCH] virtio_blk: decrement index when blockdevice is removed
...akuma Umeya <tumeya at redhat.com> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 6ecf89c..730e7af 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -489,6 +489,7 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) mempool_destroy(vblk->pool); vdev->config->del_vqs(vdev); kfree(vblk); + index--; } static const struct virtio_device_id id_table[] = { -- Umeya, Takuma Technical Account Manager Red Hat GSS APAC +81.3.5798.8584 (direct) tumeya at redhat.com
2020 Jul 10
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 10/07/20 08:32, Markus Elfring wrote: >>>> + mempool_destroy(virtscsi_cmd_pool); >>>> + virtscsi_cmd_pool = NULL; >>>> + kmem_cache_destroy(virtscsi_cmd_cache); >>>> + virtscsi_cmd_cache = NULL; >>>> return ret; >>>> } >>> >>> How do you think about to add a jump target so that...
2020 Jul 14
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On Thu, 9 Jul 2020 11:06:07 -0400, Xianting Tian wrote: > kmem_cache_destroy and mempool_destroy can correctly handle > null pointer parameter, so there is no need to check if the > parameter is null before calling kmem_cache_destroy and > mempool_destroy. Applied to 5.9/scsi-queue, thanks! [1/1] scsi: virtio_scsi: Remove unnecessary condition check https://git.kernel.org/mkp/...
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@
2012 Dec 19
2
[PATCH] virtio-blk: Don't free ida when disk is in use
...sing the device. */ mutex_lock(&vblk->config_lock); @@ -903,11 +904,15 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) flush_work(&vblk->config_work); + refc = atomic_read(&disk_to_dev(vblk->disk)->kobj.kref.refcount); put_disk(vblk->disk); mempool_destroy(vblk->pool); vdev->config->del_vqs(vdev); kfree(vblk); - ida_simple_remove(&vd_index_ida, index); + + /* Only free device id if we don't have any users */ + if (refc == 1) + ida_simple_remove(&vd_index_ida, index); } #ifdef CONFIG_PM -- 1.7.12.4
2012 Dec 19
2
[PATCH] virtio-blk: Don't free ida when disk is in use
...sing the device. */ mutex_lock(&vblk->config_lock); @@ -903,11 +904,15 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) flush_work(&vblk->config_work); + refc = atomic_read(&disk_to_dev(vblk->disk)->kobj.kref.refcount); put_disk(vblk->disk); mempool_destroy(vblk->pool); vdev->config->del_vqs(vdev); kfree(vblk); - ida_simple_remove(&vd_index_ida, index); + + /* Only free device id if we don't have any users */ + if (refc == 1) + ida_simple_remove(&vd_index_ida, index); } #ifdef CONFIG_PM -- 1.7.12.4
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
..._work); - del_gendisk(vblk->disk); + /* Abort request dispatched to driver. */ + while ((vbr = virtqueue_detach_unused_buf(vblk->vq))) { + blk_abort_request(vbr->req); + mempool_free(vbr, vblk->pool); + } + blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); + mempool_destroy(vblk->pool); vdev->config->del_vqs(vdev); kfree(vblk); -- 1.7.10
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
..._work); - del_gendisk(vblk->disk); + /* Abort request dispatched to driver. */ + while ((vbr = virtqueue_detach_unused_buf(vblk->vq))) { + blk_abort_request(vbr->req); + mempool_free(vbr, vblk->pool); + } + blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); + mempool_destroy(vblk->pool); vdev->config->del_vqs(vdev); kfree(vblk); -- 1.7.10
2012 May 25
9
[PATCH 0/3] Fix hot-unplug race in virtio-blk
This patch set fixes the race when hot-unplug stressed disk. Asias He (3): virtio-blk: Call del_gendisk() before disable guest kick virtio-blk: Reset device after blk_cleanup_queue() virtio-blk: Use block layer provided spinlock drivers/block/virtio_blk.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) -- 1.7.10.2
2012 May 25
9
[PATCH 0/3] Fix hot-unplug race in virtio-blk
This patch set fixes the race when hot-unplug stressed disk. Asias He (3): virtio-blk: Call del_gendisk() before disable guest kick virtio-blk: Reset device after blk_cleanup_queue() virtio-blk: Use block layer provided spinlock drivers/block/virtio_blk.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) -- 1.7.10.2
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
...vblk->lock, flags); + while ((vbr = virtqueue_detach_unused_buf(vblk->vq))) { + __blk_end_request_all(vbr->req, -EIO); + mempool_free(vbr, vblk->pool); + } + spin_unlock_irqrestore(&vblk->lock, flags); + blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); mempool_destroy(vblk->pool); -- 1.7.10.1
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
...vblk->lock, flags); + while ((vbr = virtqueue_detach_unused_buf(vblk->vq))) { + __blk_end_request_all(vbr->req, -EIO); + mempool_free(vbr, vblk->pool); + } + spin_unlock_irqrestore(&vblk->lock, flags); + blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); mempool_destroy(vblk->pool); -- 1.7.10.1
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...ched to device driver to finish. */ + do { + spin_lock_irqsave(&vblk->lock, flags); + req_in_flight = vblk->req_in_flight; + spin_unlock_irqrestore(&vblk->lock, flags); + } while (req_in_flight != 0); + blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); + mempool_destroy(vblk->pool); - vdev->config->del_vqs(vdev); kfree(vblk); ida_simple_remove(&vd_index_ida, index); } -- 1.7.10
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...ched to device driver to finish. */ + do { + spin_lock_irqsave(&vblk->lock, flags); + req_in_flight = vblk->req_in_flight; + spin_unlock_irqrestore(&vblk->lock, flags); + } while (req_in_flight != 0); + blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); + mempool_destroy(vblk->pool); - vdev->config->del_vqs(vdev); kfree(vblk); ida_simple_remove(&vd_index_ida, index); } -- 1.7.10
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
...le changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c > index bfec84a..5bc288f 100644 > --- a/drivers/scsi/virtio_scsi.c > +++ b/drivers/scsi/virtio_scsi.c > @@ -1007,10 +1007,8 @@ static int __init init(void) > mempool_destroy(virtscsi_cmd_pool); > virtscsi_cmd_pool = NULL; > } > - if (virtscsi_cmd_cache) { > - kmem_cache_destroy(virtscsi_cmd_cache); > - virtscsi_cmd_cache = NULL; > - } > + kmem_cache_destroy(virtscsi_cmd_cache); > + virtscsi_cmd_cache = NULL; > return ret; > } &gt...
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 09/07/20 19:16, Markus Elfring wrote: >> + mempool_destroy(virtscsi_cmd_pool); >> + virtscsi_cmd_pool = NULL; >> + kmem_cache_destroy(virtscsi_cmd_cache); >> + virtscsi_cmd_cache = NULL; >> return ret; >> } > > How do you think about to add a jump target so that the execution > of a few statements can be avoided a...
2008 May 21
1
[Fwd: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe]
(sent to the kvm mailing list erroneously first) -------------- next part -------------- An embedded message was scrubbed... From: Chris Lalancette <clalance at redhat.com> Subject: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe Date: Wed, 21 May 2008 14:45:31 +0200 Size: 4163 Url: