This is in preparation for enabling this functionality through io_uring. Add a helper that is just exporting what sys_madvise() does, and have the system call use it. No functional changes in this patch.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -2328,6 +2328,7 @@ extern int __do_munmap(struct mm_struct *, unsigned long, size_t, · 2327 unmodified lines | |||
| 2328 | struct list_head *uf, bool downgrade); | 2328 | struct list_head *uf, bool downgrade); |
| 2329 | extern int do_munmap(struct mm_struct *, unsigned long, size_t, | 2329 | extern int do_munmap(struct mm_struct *, unsigned long, size_t, |
| 2330 | struct list_head *uf); | 2330 | struct list_head *uf); |
| 2331 | extern int do_madvise(unsigned long start, size_t len_in, int behavior); | ||
| 2331 | 2332 | ||
| 2332 | static inline unsigned long | 2333 | static inline unsigned long |
| 2333 | do_mmap_pgoff(struct file *file, unsigned long addr, | 2334 | do_mmap_pgoff(struct file *file, unsigned long addr, |