diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-01-30 22:28:31 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-22 23:14:09 -0400 |
commit | 6ed2288ca93479f801f49daf9b6d674701f4c28e (patch) | |
tree | 3b79451d0daf9df8057a66ea7469d1e98ac2c128 /drivers/staging | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) | |
download | linux-stable-6ed2288ca93479f801f49daf9b6d674701f4c28e.tar.gz linux-stable-6ed2288ca93479f801f49daf9b6d674701f4c28e.tar.bz2 linux-stable-6ed2288ca93479f801f49daf9b6d674701f4c28e.zip |
vchiq_2835_arm: switch to get_user_pages_fast()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index 0159ca4407d8..cd2b19f335d8 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -92,8 +92,7 @@ static irqreturn_t vchiq_doorbell_irq(int irq, void *dev_id); static struct vchiq_pagelist_info * -create_pagelist(char __user *buf, size_t count, unsigned short type, - struct task_struct *task); +create_pagelist(char __user *buf, size_t count, unsigned short type); static void free_pagelist(struct vchiq_pagelist_info *pagelistinfo, @@ -251,8 +250,7 @@ vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, pagelistinfo = create_pagelist((char __user *)offset, size, (dir == VCHIQ_BULK_RECEIVE) ? PAGELIST_READ - : PAGELIST_WRITE, - current); + : PAGELIST_WRITE); if (!pagelistinfo) return VCHIQ_ERROR; @@ -391,8 +389,7 @@ cleanup_pagelistinfo(struct vchiq_pagelist_info *pagelistinfo) */ static struct vchiq_pagelist_info * -create_pagelist(char __user *buf, size_t count, unsigned short type, - struct task_struct *task) +create_pagelist(char __user *buf, size_t count, unsigned short type) { PAGELIST_T *pagelist; struct vchiq_pagelist_info *pagelistinfo; @@ -472,14 +469,11 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, } /* do not try and release vmalloc pages */ } else { - down_read(&task->mm->mmap_sem); - actual_pages = get_user_pages( - (unsigned long)buf & PAGE_MASK, + actual_pages = get_user_pages_fast( + (unsigned long)buf & PAGE_MASK, num_pages, - (type == PAGELIST_READ) ? FOLL_WRITE : 0, - pages, - NULL /*vmas */); - up_read(&task->mm->mmap_sem); + type == PAGELIST_READ, + pages); if (actual_pages != num_pages) { vchiq_log_info(vchiq_arm_log_level, |