mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-27 16:47:10 +00:00
34 lines
907 B
Diff
34 lines
907 B
Diff
From 0af1362108e6452fdcd49945bc4cad54ce74fd05 Mon Sep 17 00:00:00 2001
|
|
From: Wei Yongjun <weiyj.lk@gmail.com>
|
|
Date: Tue, 2 Aug 2016 13:50:42 +0000
|
|
Subject: [PATCH 11/44] VSOCK: Use kvfree()
|
|
|
|
Use kvfree() instead of open-coding it.
|
|
|
|
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
(cherry picked from commit b226acab2f6aaa45c2af27279b63f622b23a44bd)
|
|
---
|
|
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 028ca16c2d36..0ddf3a2dbfc4 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)
|
|
--
|
|
2.11.1
|
|
|