Commit 58c35841 authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

remap_pfn_range: make the region special.

VM_IO tells the rest fo the world that the pages may
have side effects on reads/writes etc, and VM_RESERVED
historically told swap-out not to bother with it.
parent b43eeba1
......@@ -974,6 +974,15 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned lon
if (from >= end)
BUG();
/*
* Physically remapped pages are special. Tell the
* rest of the world about it:
* VM_IO tells people not to look at these pages
* (accesses can have side effects).
* VM_RESERVED tells swapout not to try to touch
* this region.
*/
vma->vm_flags |= VM_IO | VM_RESERVED;
spin_lock(&mm->page_table_lock);
do {
pmd_t *pmd = pmd_alloc(mm, dir, from);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment