git: e1b0f431a109 - main - LinuxKPI: Remove vmas argument from get_user_pages on KPI layer

From: Vladimir Kondratyev <wulf_at_FreeBSD.org>
Date: Wed, 26 Jun 2024 20:54:46 UTC
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=e1b0f431a109683ca7c232fb9282f3afabfdf12d

commit e1b0f431a109683ca7c232fb9282f3afabfdf12d
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2024-06-26 20:51:04 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-06-26 20:51:04 +0000

    LinuxKPI: Remove vmas argument from get_user_pages on KPI layer
    
    To chase Linux kernel 6.5
    
    Sponsored by:   Serenity CyberSecurity, LLC
    MFC after:      1 week
    Reviewed by:    manu, emaste
    Differential Revision:  https://reviews.freebsd.org/D45614
---
 sys/compat/linuxkpi/common/include/linux/mm.h | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index e2bda799dc77..56c849b02c32 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -279,14 +279,27 @@ extern long
 get_user_pages(unsigned long start, unsigned long nr_pages,
     unsigned int gup_flags, struct page **,
     struct vm_area_struct **);
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500
+#define	get_user_pages(start, nr_pages, gup_flags, pages)	\
+	get_user_pages(start, nr_pages, gup_flags, pages, NULL)
+#endif
 
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500
+static inline long
+pin_user_pages(unsigned long start, unsigned long nr_pages,
+    unsigned int gup_flags, struct page **pages)
+{
+	return (get_user_pages(start, nr_pages, gup_flags, pages));
+}
+#else
 static inline long
 pin_user_pages(unsigned long start, unsigned long nr_pages,
     unsigned int gup_flags, struct page **pages,
     struct vm_area_struct **vmas)
 {
-	return get_user_pages(start, nr_pages, gup_flags, pages, vmas);
+	return (get_user_pages(start, nr_pages, gup_flags, pages, vmas));
 }
+#endif
 
 extern int
 __get_user_pages_fast(unsigned long start, int nr_pages, int write,