Currently, there is still ro/rw inconsistency related to shared mmap in overlayfs, this patch set implements stacked mmap for shared map and transfer necessary operations to upper inode, so that we can keep data consistency in any kind of mmap. Patch 1 exports necessary functions from kernel to module. Patch 2 introduces struct ovl_file_entry to store real vm_ops. Patch 3 implements stacked mmap for shared map to keep data consistency. Chengguang Xu (3): mm: mmap: export necessary functions for overlayfs' mmap ovl: introduce struct ovl_file_entry ovl: implement stacked mmap for shared map fs/overlayfs/file.c | 178 ++++++++++++++++++++++++++++++++++++++++---- include/linux/mm.h | 2 + mm/filemap.c | 28 +++++++ mm/internal.h | 22 ------ 4 files changed, 195 insertions(+), 35 deletions(-) -- 2.20.1