From patchwork Wed Oct 2 14:27:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 2975211 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F199C9F2B8 for ; Wed, 2 Oct 2013 14:32:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 479CA20426 for ; Wed, 2 Oct 2013 14:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 207C02029B for ; Wed, 2 Oct 2013 14:32:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753758Ab3JBObZ (ORCPT ); Wed, 2 Oct 2013 10:31:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49028 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320Ab3JBO3A (ORCPT ); Wed, 2 Oct 2013 10:29:00 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E518AA5511; Wed, 2 Oct 2013 16:28:57 +0200 (CEST) Received: by quack.suse.cz (Postfix, from userid 1000) id F30BB80EC3; Wed, 2 Oct 2013 16:28:54 +0200 (CEST) From: Jan Kara To: LKML Cc: linux-mm@kvack.org, Jan Kara , linux-fbdev@vger.kernel.org, Tomi Valkeinen , Jean-Christophe Plagniol-Villard Subject: [PATCH 12/26] pvr2fb: Convert pvr2fb_write() to use get_user_pages_fast() Date: Wed, 2 Oct 2013 16:27:53 +0200 Message-Id: <1380724087-13927-13-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1380724087-13927-1-git-send-email-jack@suse.cz> References: <1380724087-13927-1-git-send-email-jack@suse.cz> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CC: linux-fbdev@vger.kernel.org CC: Tomi Valkeinen CC: Jean-Christophe Plagniol-Villard Signed-off-by: Jan Kara --- drivers/video/pvr2fb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index df07860563e6..31e1345a88a8 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c @@ -686,11 +686,7 @@ static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, if (!pages) return -ENOMEM; - down_read(¤t->mm->mmap_sem); - ret = get_user_pages(current, current->mm, (unsigned long)buf, - nr_pages, WRITE, 0, pages, NULL); - up_read(¤t->mm->mmap_sem); - + ret = get_user_pages_fast((unsigned long)buf, nr_pages, WRITE, pages); if (ret < nr_pages) { nr_pages = ret; ret = -EINVAL;