madvise.c (e2a3b0df8dea7585a2e64861f3ab7bcbc2a04386) | madvise.c (05ce77249d5068b057082d24ec22d3824f4816ac) |
---|---|
1/* 2 * linux/mm/madvise.c 3 * 4 * Copyright (C) 1999 Linus Torvalds 5 * Copyright (C) 2002 Christoph Hellwig 6 */ 7 8#include <linux/mman.h> 9#include <linux/pagemap.h> 10#include <linux/syscalls.h> 11#include <linux/mempolicy.h> 12#include <linux/page-isolation.h> | 1/* 2 * linux/mm/madvise.c 3 * 4 * Copyright (C) 1999 Linus Torvalds 5 * Copyright (C) 2002 Christoph Hellwig 6 */ 7 8#include <linux/mman.h> 9#include <linux/pagemap.h> 10#include <linux/syscalls.h> 11#include <linux/mempolicy.h> 12#include <linux/page-isolation.h> |
13#include <linux/userfaultfd_k.h> |
|
13#include <linux/hugetlb.h> 14#include <linux/falloc.h> 15#include <linux/sched.h> 16#include <linux/ksm.h> 17#include <linux/fs.h> 18#include <linux/file.h> 19#include <linux/blkdev.h> 20#include <linux/backing-dev.h> --- 451 unchanged lines hidden (view full) --- 472 struct vm_area_struct **prev, 473 unsigned long start, unsigned long end) 474{ 475 *prev = vma; 476 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP)) 477 return -EINVAL; 478 479 zap_page_range(vma, start, end - start, NULL); | 14#include <linux/hugetlb.h> 15#include <linux/falloc.h> 16#include <linux/sched.h> 17#include <linux/ksm.h> 18#include <linux/fs.h> 19#include <linux/file.h> 20#include <linux/blkdev.h> 21#include <linux/backing-dev.h> --- 451 unchanged lines hidden (view full) --- 473 struct vm_area_struct **prev, 474 unsigned long start, unsigned long end) 475{ 476 *prev = vma; 477 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP)) 478 return -EINVAL; 479 480 zap_page_range(vma, start, end - start, NULL); |
481 madvise_userfault_dontneed(vma, prev, start, end); |
|
480 return 0; 481} 482 483/* 484 * Application wants to free up the pages and associated backing store. 485 * This is effectively punching a hole into the middle of a file. 486 */ 487static long madvise_remove(struct vm_area_struct *vma, --- 283 unchanged lines hidden --- | 482 return 0; 483} 484 485/* 486 * Application wants to free up the pages and associated backing store. 487 * This is effectively punching a hole into the middle of a file. 488 */ 489static long madvise_remove(struct vm_area_struct *vma, --- 283 unchanged lines hidden --- |