summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-07 20:43:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-07 20:43:58 -0500
commitf86727f8bd650b6b79bbbb7b0b57b3a43522a28e (patch)
treebf7e795fb8d613afb4b92910977b34e5a80f5574 /mm
parentd2cb698f6896d4b3fc6794142a902d2647f7dbae (diff)
parentad8cfb9c42ef83ecf4079bc7d77e6557648e952b (diff)
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()
Diffstat (limited to 'mm')
-rw-r--r--mm/gup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/gup.c b/mm/gup.c
index 22291db50013..f84e22685aaa 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1939,7 +1939,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end,
1939 * Check if it's allowed to use __get_user_pages_fast() for the range, or 1939 * Check if it's allowed to use __get_user_pages_fast() for the range, or
1940 * we need to fall back to the slow version: 1940 * we need to fall back to the slow version:
1941 */ 1941 */
1942bool gup_fast_permitted(unsigned long start, int nr_pages, int write) 1942bool gup_fast_permitted(unsigned long start, int nr_pages)
1943{ 1943{
1944 unsigned long len, end; 1944 unsigned long len, end;
1945 1945
@@ -1981,7 +1981,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
1981 * block IPIs that come from THPs splitting. 1981 * block IPIs that come from THPs splitting.
1982 */ 1982 */
1983 1983
1984 if (gup_fast_permitted(start, nr_pages, write)) { 1984 if (gup_fast_permitted(start, nr_pages)) {
1985 local_irq_save(flags); 1985 local_irq_save(flags);
1986 gup_pgd_range(start, end, write, pages, &nr); 1986 gup_pgd_range(start, end, write, pages, &nr);
1987 local_irq_restore(flags); 1987 local_irq_restore(flags);
@@ -2023,7 +2023,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
2023 if (unlikely(!access_ok((void __user *)start, len))) 2023 if (unlikely(!access_ok((void __user *)start, len)))
2024 return -EFAULT; 2024 return -EFAULT;
2025 2025
2026 if (gup_fast_permitted(start, nr_pages, write)) { 2026 if (gup_fast_permitted(start, nr_pages)) {
2027 local_irq_disable(); 2027 local_irq_disable();
2028 gup_pgd_range(addr, end, write, pages, &nr); 2028 gup_pgd_range(addr, end, write, pages, &nr);
2029 local_irq_enable(); 2029 local_irq_enable();