Skip to content

Commit

Permalink
mm/gup: Remove the 'write' parameter from gup_fast_permitted()
Browse files Browse the repository at this point in the history
The 'write' parameter is unused in gup_fast_permitted() so remove it.

Signed-off-by: Ira Weiny <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
weiny2 authored and Ingo Molnar committed Feb 11, 2019
1 parent d139371 commit ad8cfb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions arch/x86/include/asm/pgtable_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);

#define gup_fast_permitted gup_fast_permitted
static inline bool gup_fast_permitted(unsigned long start, int nr_pages,
int write)
static inline bool gup_fast_permitted(unsigned long start, int nr_pages)
{
unsigned long len, end;

Expand Down
6 changes: 3 additions & 3 deletions mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1786,7 +1786,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end,
* Check if it's allowed to use __get_user_pages_fast() for the range, or
* we need to fall back to the slow version:
*/
bool gup_fast_permitted(unsigned long start, int nr_pages, int write)
bool gup_fast_permitted(unsigned long start, int nr_pages)
{
unsigned long len, end;

Expand Down Expand Up @@ -1828,7 +1828,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
* block IPIs that come from THPs splitting.
*/

if (gup_fast_permitted(start, nr_pages, write)) {
if (gup_fast_permitted(start, nr_pages)) {
local_irq_save(flags);
gup_pgd_range(start, end, write, pages, &nr);
local_irq_restore(flags);
Expand Down Expand Up @@ -1870,7 +1870,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
if (unlikely(!access_ok((void __user *)start, len)))
return -EFAULT;

if (gup_fast_permitted(start, nr_pages, write)) {
if (gup_fast_permitted(start, nr_pages)) {
local_irq_disable();
gup_pgd_range(addr, end, write, pages, &nr);
local_irq_enable();
Expand Down

0 comments on commit ad8cfb9

Please sign in to comment.