|
@@ -737,9 +737,6 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma,
|
|
ptent = pte_file_clear_soft_dirty(ptent);
|
|
ptent = pte_file_clear_soft_dirty(ptent);
|
|
}
|
|
}
|
|
|
|
|
|
- if (vma->vm_flags & VM_SOFTDIRTY)
|
|
|
|
- vma->vm_flags &= ~VM_SOFTDIRTY;
|
|
|
|
-
|
|
|
|
set_pte_at(vma->vm_mm, addr, pte, ptent);
|
|
set_pte_at(vma->vm_mm, addr, pte, ptent);
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
@@ -807,8 +804,9 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
|
|
|
|
|
|
if (type == CLEAR_REFS_SOFT_DIRTY) {
|
|
if (type == CLEAR_REFS_SOFT_DIRTY) {
|
|
soft_dirty_cleared = true;
|
|
soft_dirty_cleared = true;
|
|
- pr_warn_once("The pagemap bits 55-60 has changed their meaning! "
|
|
|
|
- "See the linux/Documentation/vm/pagemap.txt for details.\n");
|
|
|
|
|
|
+ pr_warn_once("The pagemap bits 55-60 has changed their meaning!"
|
|
|
|
+ " See the linux/Documentation/vm/pagemap.txt for "
|
|
|
|
+ "details.\n");
|
|
}
|
|
}
|
|
|
|
|
|
task = get_proc_task(file_inode(file));
|
|
task = get_proc_task(file_inode(file));
|
|
@@ -839,11 +837,17 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
|
|
*
|
|
*
|
|
* Writing 3 to /proc/pid/clear_refs only affects file
|
|
* Writing 3 to /proc/pid/clear_refs only affects file
|
|
* mapped pages.
|
|
* mapped pages.
|
|
|
|
+ *
|
|
|
|
+ * Writing 4 to /proc/pid/clear_refs affects all pages.
|
|
*/
|
|
*/
|
|
if (type == CLEAR_REFS_ANON && vma->vm_file)
|
|
if (type == CLEAR_REFS_ANON && vma->vm_file)
|
|
continue;
|
|
continue;
|
|
if (type == CLEAR_REFS_MAPPED && !vma->vm_file)
|
|
if (type == CLEAR_REFS_MAPPED && !vma->vm_file)
|
|
continue;
|
|
continue;
|
|
|
|
+ if (type == CLEAR_REFS_SOFT_DIRTY) {
|
|
|
|
+ if (vma->vm_flags & VM_SOFTDIRTY)
|
|
|
|
+ vma->vm_flags &= ~VM_SOFTDIRTY;
|
|
|
|
+ }
|
|
walk_page_range(vma->vm_start, vma->vm_end,
|
|
walk_page_range(vma->vm_start, vma->vm_end,
|
|
&clear_refs_walk);
|
|
&clear_refs_walk);
|
|
}
|
|
}
|