* [PATCH] vhost-scsi: don't open-code kvfree
@ 2014-06-12 16:02 ` Michael S. Tsirkin
0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2014-06-12 16:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Nicholas Bellinger, kvm, virtualization, netdev
Now that we have kvfree, use it in vhost-scsi instead of
the open-coded version.
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
I have this queued for -rc2.
Nicholas could you review ack pls?
drivers/vhost/scsi.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 83b834b..b08863e 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1396,14 +1396,6 @@ static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
return 0;
}
-static void vhost_scsi_free(struct vhost_scsi *vs)
-{
- if (is_vmalloc_addr(vs))
- vfree(vs);
- else
- kfree(vs);
-}
-
static int vhost_scsi_open(struct inode *inode, struct file *f)
{
struct vhost_scsi *vs;
@@ -1443,7 +1435,7 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
return 0;
err_vqs:
- vhost_scsi_free(vs);
+ kvfree(vs);
err_vs:
return r;
}
@@ -1462,7 +1454,7 @@ static int vhost_scsi_release(struct inode *inode, struct file *f)
/* Jobs can re-queue themselves in evt kick handler. Do extra flush. */
vhost_scsi_flush(vs);
kfree(vs->dev.vqs);
- vhost_scsi_free(vs);
+ kvfree(vs);
return 0;
}
--
MST
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] vhost-scsi: don't open-code kvfree
@ 2014-06-12 16:02 ` Michael S. Tsirkin
0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2014-06-12 16:02 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev, kvm, virtualization
Now that we have kvfree, use it in vhost-scsi instead of
the open-coded version.
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
I have this queued for -rc2.
Nicholas could you review ack pls?
drivers/vhost/scsi.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 83b834b..b08863e 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1396,14 +1396,6 @@ static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
return 0;
}
-static void vhost_scsi_free(struct vhost_scsi *vs)
-{
- if (is_vmalloc_addr(vs))
- vfree(vs);
- else
- kfree(vs);
-}
-
static int vhost_scsi_open(struct inode *inode, struct file *f)
{
struct vhost_scsi *vs;
@@ -1443,7 +1435,7 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
return 0;
err_vqs:
- vhost_scsi_free(vs);
+ kvfree(vs);
err_vs:
return r;
}
@@ -1462,7 +1454,7 @@ static int vhost_scsi_release(struct inode *inode, struct file *f)
/* Jobs can re-queue themselves in evt kick handler. Do extra flush. */
vhost_scsi_flush(vs);
kfree(vs->dev.vqs);
- vhost_scsi_free(vs);
+ kvfree(vs);
return 0;
}
--
MST
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] vhost-scsi: don't open-code kvfree
2014-06-12 16:02 ` Michael S. Tsirkin
@ 2014-06-12 16:56 ` Paolo Bonzini
-1 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-06-12 16:56 UTC (permalink / raw)
To: Michael S. Tsirkin, linux-kernel
Cc: netdev, kvm, virtualization, Nicholas A. Bellinger
Il 12/06/2014 18:02, Michael S. Tsirkin ha scritto:
> Now that we have kvfree, use it in vhost-scsi instead of
> the open-coded version.
>
> Cc: Nicholas Bellinger <nab@linux-iscsi.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> I have this queued for -rc2.
> Nicholas could you review ack pls?
>
> drivers/vhost/scsi.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index 83b834b..b08863e 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -1396,14 +1396,6 @@ static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
> return 0;
> }
>
> -static void vhost_scsi_free(struct vhost_scsi *vs)
> -{
> - if (is_vmalloc_addr(vs))
> - vfree(vs);
> - else
> - kfree(vs);
> -}
> -
> static int vhost_scsi_open(struct inode *inode, struct file *f)
> {
> struct vhost_scsi *vs;
> @@ -1443,7 +1435,7 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
> return 0;
>
> err_vqs:
> - vhost_scsi_free(vs);
> + kvfree(vs);
> err_vs:
> return r;
> }
> @@ -1462,7 +1454,7 @@ static int vhost_scsi_release(struct inode *inode, struct file *f)
> /* Jobs can re-queue themselves in evt kick handler. Do extra flush. */
> vhost_scsi_flush(vs);
> kfree(vs->dev.vqs);
> - vhost_scsi_free(vs);
> + kvfree(vs);
> return 0;
> }
>
>
You didn't CC Nicholas. :) Anyway,
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vhost-scsi: don't open-code kvfree
@ 2014-06-12 16:56 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-06-12 16:56 UTC (permalink / raw)
To: Michael S. Tsirkin, linux-kernel; +Cc: netdev, kvm, virtualization
Il 12/06/2014 18:02, Michael S. Tsirkin ha scritto:
> Now that we have kvfree, use it in vhost-scsi instead of
> the open-coded version.
>
> Cc: Nicholas Bellinger <nab@linux-iscsi.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> I have this queued for -rc2.
> Nicholas could you review ack pls?
>
> drivers/vhost/scsi.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index 83b834b..b08863e 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -1396,14 +1396,6 @@ static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
> return 0;
> }
>
> -static void vhost_scsi_free(struct vhost_scsi *vs)
> -{
> - if (is_vmalloc_addr(vs))
> - vfree(vs);
> - else
> - kfree(vs);
> -}
> -
> static int vhost_scsi_open(struct inode *inode, struct file *f)
> {
> struct vhost_scsi *vs;
> @@ -1443,7 +1435,7 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
> return 0;
>
> err_vqs:
> - vhost_scsi_free(vs);
> + kvfree(vs);
> err_vs:
> return r;
> }
> @@ -1462,7 +1454,7 @@ static int vhost_scsi_release(struct inode *inode, struct file *f)
> /* Jobs can re-queue themselves in evt kick handler. Do extra flush. */
> vhost_scsi_flush(vs);
> kfree(vs->dev.vqs);
> - vhost_scsi_free(vs);
> + kvfree(vs);
> return 0;
> }
>
>
You didn't CC Nicholas. :) Anyway,
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vhost-scsi: don't open-code kvfree
2014-06-12 16:02 ` Michael S. Tsirkin
@ 2014-06-12 17:59 ` Nicholas A. Bellinger
-1 siblings, 0 replies; 6+ messages in thread
From: Nicholas A. Bellinger @ 2014-06-12 17:59 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: linux-kernel, kvm, virtualization, netdev
On Thu, 2014-06-12 at 19:02 +0300, Michael S. Tsirkin wrote:
> Now that we have kvfree, use it in vhost-scsi instead of
> the open-coded version.
>
> Cc: Nicholas Bellinger <nab@linux-iscsi.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> I have this queued for -rc2.
> Nicholas could you review ack pls?
Reviewed-by + Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
Thanks MST!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] vhost-scsi: don't open-code kvfree
@ 2014-06-12 17:59 ` Nicholas A. Bellinger
0 siblings, 0 replies; 6+ messages in thread
From: Nicholas A. Bellinger @ 2014-06-12 17:59 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
On Thu, 2014-06-12 at 19:02 +0300, Michael S. Tsirkin wrote:
> Now that we have kvfree, use it in vhost-scsi instead of
> the open-coded version.
>
> Cc: Nicholas Bellinger <nab@linux-iscsi.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> I have this queued for -rc2.
> Nicholas could you review ack pls?
Reviewed-by + Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
Thanks MST!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-12 17:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 16:02 [PATCH] vhost-scsi: don't open-code kvfree Michael S. Tsirkin
2014-06-12 16:02 ` Michael S. Tsirkin
2014-06-12 16:56 ` Paolo Bonzini
2014-06-12 16:56 ` Paolo Bonzini
2014-06-12 17:59 ` Nicholas A. Bellinger
2014-06-12 17:59 ` Nicholas A. Bellinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.