netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] vhost-scsi: don't open-code kvfree
Date: Thu, 12 Jun 2014 18:56:34 +0200	[thread overview]
Message-ID: <5399DBC2.6070004@redhat.com> (raw)
In-Reply-To: <1402588896-25446-1-git-send-email-mst@redhat.com>

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

  reply	other threads:[~2014-06-12 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 16:02 [PATCH] vhost-scsi: don't open-code kvfree Michael S. Tsirkin
2014-06-12 16:56 ` Paolo Bonzini [this message]
2014-06-12 17:59 ` Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5399DBC2.6070004@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).