This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] v4l: vb2-memops: use vma slab when vma allocation
Author:  KyongHo Cho <pullip....@samsung.com>
Date:    Thu Feb 5 02:52:42 2015 -0300

The slab for vm_area_struct which is vm_area_cachep is already prepared
for the general use. Instead of kmalloc() for the vma copy for userptr,
allocation from vm_area_cachep is more beneficial.

CC: Hans Verkuil <hans.verk...@cisco.com>
CC: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
Signed-off-by: Cho KyongHo <pullip....@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>

 drivers/media/v4l2-core/videobuf2-memops.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=5ed1c328ea077d70e1ebcd5188dc77cdc754df3a

diff --git a/drivers/media/v4l2-core/videobuf2-memops.c 
b/drivers/media/v4l2-core/videobuf2-memops.c
index 81c1ad8..dd06efa 100644
--- a/drivers/media/v4l2-core/videobuf2-memops.c
+++ b/drivers/media/v4l2-core/videobuf2-memops.c
@@ -37,7 +37,7 @@ struct vm_area_struct *vb2_get_vma(struct vm_area_struct *vma)
 {
        struct vm_area_struct *vma_copy;
 
-       vma_copy = kmalloc(sizeof(*vma_copy), GFP_KERNEL);
+       vma_copy = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
        if (vma_copy == NULL)
                return NULL;
 
@@ -75,7 +75,7 @@ void vb2_put_vma(struct vm_area_struct *vma)
        if (vma->vm_file)
                fput(vma->vm_file);
 
-       kfree(vma);
+       kmem_cache_free(vm_area_cachep, vma);
 }
 EXPORT_SYMBOL_GPL(vb2_put_vma);
 

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to