diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-31 21:01:08 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-31 21:01:08 +0300 |
commit | 5a87e37ee0943afe11504299e4b87d2e4d8d88d5 (patch) | |
tree | bd8b5af826eda948190d8ec3d1afd869f834a971 /arch/cris | |
parent | 19e7b5f99474107e8d0b4b3e4652fa19ddb87efc (diff) | |
parent | ce53053ce378c21e7ffc45241fd67d6ee79daa2b (diff) | |
download | linux-5a87e37ee0943afe11504299e4b87d2e4d8d88d5.tar.xz |
Merge branch 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull get_user_pages_fast updates from Al Viro:
"A bit more get_user_pages work"
* 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
kvm: switch get_user_page_nowait() to get_user_pages_unlocked()
__get_user_pages_locked(): get rid of notify_drop argument
get_user_pages_unlocked(): pass true to __get_user_pages_locked() notify_drop
cris: switch to get_user_pages_fast()
fold __get_user_pages_unlocked() into its sole remaining caller
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/arch-v32/drivers/cryptocop.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index d688fe117dca..a3c353472a8c 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -2717,37 +2717,28 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig } } - /* Acquire the mm page semaphore. */ - down_read(¤t->mm->mmap_sem); - - err = get_user_pages((unsigned long int)(oper.indata + prev_ix), + err = get_user_pages_fast((unsigned long)(oper.indata + prev_ix), noinpages, - 0, /* read access only for in data */ - inpages, - NULL); + false, /* read access only for in data */ + inpages); if (err < 0) { - up_read(¤t->mm->mmap_sem); nooutpages = noinpages = 0; DEBUG_API(printk("cryptocop_ioctl_process: get_user_pages indata\n")); goto error_cleanup; } noinpages = err; - if (oper.do_cipher){ - err = get_user_pages((unsigned long int)oper.cipher_outdata, + if (oper.do_cipher) { + err = get_user_pages_fast((unsigned long)oper.cipher_outdata, nooutpages, - FOLL_WRITE, /* write access for out data */ - outpages, - NULL); - up_read(¤t->mm->mmap_sem); + true, /* write access for out data */ + outpages); if (err < 0) { nooutpages = 0; DEBUG_API(printk("cryptocop_ioctl_process: get_user_pages outdata\n")); goto error_cleanup; } nooutpages = err; - } else { - up_read(¤t->mm->mmap_sem); } /* Add 6 to nooutpages to make room for possibly inserted buffers for storing digest and |