]> git.baikalelectronics.ru Git - kernel.git/commit
[media] vb2: Push mmap_sem down to memops
authorJan Kara <jack@suse.cz>
Tue, 17 Mar 2015 11:56:31 +0000 (08:56 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:17:27 +0000 (07:17 -0300)
commit99071c10e31aace3e5560c1cc7fb6fa0b3cddf10
tree818fab949bd94cbafbef001ca307d4756dd9df1c
parent55ba754aa5f367423eee6f7d09e42eb2f331d854
[media] vb2: Push mmap_sem down to memops

Currently vb2 core acquires mmap_sem just around call to
__qbuf_userptr(). However since commit 324abae525ad9a (videobuf2: fix
lockdep warning) it isn't necessary to acquire it so early as we no
longer have to drop queue mutex before acquiring mmap_sem. So push
acquisition of mmap_sem down into .get_userptr and .put_userptr memops
so that the semaphore is acquired for a shorter time and it is clearer
what it is needed for.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-core.c
drivers/media/v4l2-core/videobuf2-dma-contig.c
drivers/media/v4l2-core/videobuf2-dma-sg.c
drivers/media/v4l2-core/videobuf2-vmalloc.c