History

mm: make do_madvise() available internally

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.

Jens Axboe committed 6 years ago

Commit db08ca21 parent 4840e412 files · +7 −1Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/mm.h+1−0
@@ -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);
2329extern int do_munmap(struct mm_struct *, unsigned long, size_t,2329extern int do_munmap(struct mm_struct *, unsigned long, size_t,
2330 struct list_head *uf);2330 struct list_head *uf);
2331extern int do_madvise(unsigned long start, size_t len_in, int behavior);
2331 2332
2332static inline unsigned long2333static inline unsigned long
2333do_mmap_pgoff(struct file *file, unsigned long addr,2334do_mmap_pgoff(struct file *file, unsigned long addr,