summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2019-02-10 17:34:24 -0500
committerIngo Molnar <mingo@kernel.org>2019-02-11 02:20:40 -0500
commitad8cfb9c42ef83ecf4079bc7d77e6557648e952b (patch)
tree23162cd4c371ff5f8f70773365b3764ae0bbe2ae /mm
parentd13937116f1e82bf508a6325111b322c30c85eb9 (diff)
mm/gup: Remove the 'write' parameter from gup_fast_permitted()
The 'write' parameter is unused in gup_fast_permitted() so remove it. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20190210223424.13934-1-ira.weiny@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 05acd7e2eb22..b63e88eca31b 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1786,7 +1786,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end,
1786 * Check if it's allowed to use __get_user_pages_fast() for the range, or 1786 * Check if it's allowed to use __get_user_pages_fast() for the range, or
1787 * we need to fall back to the slow version: 1787 * we need to fall back to the slow version:
1788 */ 1788 */
1789bool gup_fast_permitted(unsigned long start, int nr_pages, int write) 1789bool gup_fast_permitted(unsigned long start, int nr_pages)
1790{ 1790{
1791 unsigned long len, end; 1791 unsigned long len, end;
1792 1792
@@ -1828,7 +1828,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
1828 * block IPIs that come from THPs splitting. 1828 * block IPIs that come from THPs splitting.
1829 */ 1829 */
1830 1830
1831 if (gup_fast_permitted(start, nr_pages, write)) { 1831 if (gup_fast_permitted(start, nr_pages)) {
1832 local_irq_save(flags); 1832 local_irq_save(flags);
1833 gup_pgd_range(start, end, write, pages, &nr); 1833 gup_pgd_range(start, end, write, pages, &nr);
1834 local_irq_restore(flags); 1834 local_irq_restore(flags);
@@ -1870,7 +1870,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
1870 if (unlikely(!access_ok((void __user *)start, len))) 1870 if (unlikely(!access_ok((void __user *)start, len)))
1871 return -EFAULT; 1871 return -EFAULT;
1872 1872
1873 if (gup_fast_permitted(start, nr_pages, write)) { 1873 if (gup_fast_permitted(start, nr_pages)) {
1874 local_irq_disable(); 1874 local_irq_disable();
1875 gup_pgd_range(addr, end, write, pages, &nr); 1875 gup_pgd_range(addr, end, write, pages, &nr);
1876 local_irq_enable(); 1876 local_irq_enable();