
From: Kemeng Shi <shikemeng@huawei.com> euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7RO5Q CVE: NA Reference: https://gitee.com/openeuler/kernel/commit/b861c9edbec7478c5dbaafeeb4da0a8fe1... ------------------------------------------------- support ioctl for etmem scan to set scan flag Signed-off-by: Kemeng Shi <shikemeng@huawei.com> Reviewed-by: louhongxiang <louhongxiang@huawei.com> Reviewed-by: Chen Wandun <chenwandun@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> --- fs/proc/task_mmu.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index f771df409978..38439f46de3a 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1828,11 +1828,20 @@ static int mm_idle_release(struct inode *inode, struct file *file) return 0; } +static long mm_idle_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +{ + if (proc_page_scan_operations.unlocked_ioctl) + return proc_page_scan_operations.unlocked_ioctl(filp, cmd, arg); + + return 0; +} + const struct file_operations proc_mm_idle_operations = { .llseek = mem_lseek, /* borrow this */ .read = mm_idle_read, .open = mm_idle_open, .release = mm_idle_release, + .unlocked_ioctl = mm_idle_ioctl, }; /*swap pages*/ -- 2.27.0