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
23282328 struct list_head *uf, bool downgrade);
23292329 extern int do_munmap(struct mm_struct *, unsigned long, size_t,
23302330 struct list_head *uf);
2331+extern int do_madvise(unsigned long start, size_t len_in, int behavior);
23312332
23322333 static inline unsigned long
23332334 do_mmap_pgoff(struct file *file, unsigned long addr,