git: 3eb02936927e - stable/14 - LinuxKPI: Remove vmas argument from get_user_pages on KPI layer
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Aug 2024 22:27:53 UTC
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=3eb02936927e0977ef6d17fb47187aa4d9309c76 commit 3eb02936927e0977ef6d17fb47187aa4d9309c76 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2024-06-26 20:51:04 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-08-01 21:09:41 +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 (cherry picked from commit e1b0f431a109683ca7c232fb9282f3afabfdf12d) --- 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,