Commit db641047 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d3a45067
...@@ -633,6 +633,7 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write) ...@@ -633,6 +633,7 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write)
pgoff_t pagen; pgoff_t pagen;
Page *page; Page *page;
BigFileH *fileh; BigFileH *fileh;
struct list_head *hmmap;
/* continuing on_pagefault() - see (1) there ... */ /* continuing on_pagefault() - see (1) there ... */
...@@ -824,6 +825,13 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write) ...@@ -824,6 +825,13 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write)
// XXX mmap page to all vma with .mmap_overlay=1 of this fileh. // XXX mmap page to all vma with .mmap_overlay=1 of this fileh.
vma_mmap_page(vma, page); vma_mmap_page(vma, page);
/* wcfs: mmap the page to all wcfs-backed vmas. If we don't the memory on
* those vmas will read with stale data */
list_for_each(hmmap, &fileh->mmaps) {
VMA *vma2 = list_entry(hmmap, typeof(*vma2), same_fileh);
if (vma2 != vma && vma2->mmap_overlay)
vma_mmap_page(vma2, page);
}
/* mark page as used recently */ /* mark page as used recently */
// XXX = list_move_tail() // XXX = list_move_tail()
......
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