From: "Michael S. Tsirkin" <mst@redhat.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: kvm@vger.kernel.org, Stefan Hajnoczi <stefanha@redhat.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH -next] VSOCK: Use kvfree()
Date: Tue, 2 Aug 2016 16:52:47 +0300 [thread overview]
Message-ID: <20160802165239-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1470145842-17614-1-git-send-email-weiyj.lk@gmail.com>
On Tue, Aug 02, 2016 at 01:50:42PM +0000, Wei Yongjun wrote:
> Use kvfree() instead of open-coding it.
>
> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Applied, thanks!
> ---
> drivers/vhost/vsock.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
> index 028ca16..0ddf3a2 100644
> --- a/drivers/vhost/vsock.c
> +++ b/drivers/vhost/vsock.c
> @@ -434,10 +434,7 @@ err:
>
> static void vhost_vsock_free(struct vhost_vsock *vsock)
> {
> - if (is_vmalloc_addr(vsock))
> - vfree(vsock);
> - else
> - kfree(vsock);
> + kvfree(vsock);
> }
>
> static int vhost_vsock_dev_open(struct inode *inode, struct file *file)
prev parent reply other threads:[~2016-08-02 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 13:50 [PATCH -next] VSOCK: Use kvfree() Wei Yongjun
2016-08-02 13:52 ` Michael S. Tsirkin [this message]
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=20160802165239-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=weiyj.lk@gmail.com \
/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 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.