mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
fuse: fix "direct_io" private mmap
MAP_PRIVATE mmap could return stale data from the cache for "direct_io" files. Fix this by flushing the cache on mmap. Found with a slightly modified fsx-linux. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
parent
ce60a2f157
commit
3121bfe763
1 changed files with 2 additions and 0 deletions
|
@ -1298,6 +1298,8 @@ static int fuse_direct_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
if (vma->vm_flags & VM_MAYSHARE)
|
||||
return -ENODEV;
|
||||
|
||||
invalidate_inode_pages2(file->f_mapping);
|
||||
|
||||
return generic_file_mmap(file, vma);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue