ced1401: Convert driver to use get_user_pages_fast()
authorJan Kara <jack@suse.cz>
Wed, 2 Oct 2013 14:27:49 +0000 (16:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Oct 2013 00:52:58 +0000 (17:52 -0700)
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ced1401/ced_ioc.c

index 2dbaf39..62efd74 100644 (file)
@@ -692,10 +692,7 @@ static int SetArea(DEVICE_EXTENSION *pdx, int nArea, char __user *puBuf,
                __func__, puBuf, dwLength, bCircular);
 
        /*  To pin down user pages we must first acquire the mapping semaphore. */
-       down_read(&current->mm->mmap_sem);      /*  get memory map semaphore */
-       nPages = get_user_pages(current, current->mm, ulStart, len, 1, 0,
-                               pPages, NULL);
-       up_read(&current->mm->mmap_sem);        /*  release the semaphore */
+       nPages = get_user_pages_fast(ulStart, len, 1, pPages);
        dev_dbg(&pdx->interface->dev, "%s nPages = %d", __func__, nPages);
 
        if (nPages > 0) {               /*  if we succeeded */