mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
linuxkpi: Move invalidate_mapping_pages() to <linux/pagemap.h>
[Why] This is consistent with Linux. [How] The definition is moved from <linux/shmem_fs.h> to <linux/pagemap.h> and the latter is included from the former. This is how it is done on Linux. Prototypes are also expanded with argument names. I got a build failure in the DRM 5.18 drivers because the compiler considered that the `pgoff_t` argument was there twice. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43018
This commit is contained in:
parent
50a56453da
commit
4e0d3f7b3c
2 changed files with 14 additions and 7 deletions
|
|
@ -33,6 +33,12 @@
|
|||
#include <linux/highmem.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#define invalidate_mapping_pages(...) \
|
||||
linux_invalidate_mapping_pages(__VA_ARGS__)
|
||||
|
||||
unsigned long linux_invalidate_mapping_pages(vm_object_t obj, pgoff_t start,
|
||||
pgoff_t end);
|
||||
|
||||
static inline void
|
||||
release_pages(struct page **pages, int nr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,14 +29,15 @@
|
|||
#ifndef _LINUXKPI_LINUX_SHMEM_FS_H_
|
||||
#define _LINUXKPI_LINUX_SHMEM_FS_H_
|
||||
|
||||
/* Shared memory support */
|
||||
unsigned long linux_invalidate_mapping_pages(vm_object_t, pgoff_t, pgoff_t);
|
||||
struct page *linux_shmem_read_mapping_page_gfp(vm_object_t, int, gfp_t);
|
||||
struct linux_file *linux_shmem_file_setup(const char *, loff_t, unsigned long);
|
||||
void linux_shmem_truncate_range(vm_object_t, loff_t, loff_t);
|
||||
#include <linux/pagemap.h>
|
||||
|
||||
#define invalidate_mapping_pages(...) \
|
||||
linux_invalidate_mapping_pages(__VA_ARGS__)
|
||||
/* Shared memory support */
|
||||
struct page *linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex,
|
||||
gfp_t gfp);
|
||||
struct linux_file *linux_shmem_file_setup(const char *name, loff_t size,
|
||||
unsigned long flags);
|
||||
void linux_shmem_truncate_range(vm_object_t obj, loff_t lstart,
|
||||
loff_t lend);
|
||||
|
||||
#define shmem_read_mapping_page(...) \
|
||||
linux_shmem_read_mapping_page_gfp(__VA_ARGS__, 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue