mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm cleanup from Ingo Molnar: "A single GUP cleanup" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: mm/gup: Remove the 'write' parameter from gup_fast_permitted()
This commit is contained in:
commit
f86727f8bd
@ -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;
|
||||
|
||||
|
6
mm/gup.c
6
mm/gup.c
@ -1939,7 +1939,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;
|
||||
|
||||
@ -1981,7 +1981,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);
|
||||
@ -2023,7 +2023,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();
|
||||
|
Loading…
Reference in New Issue
Block a user