Commit 3121bfe7631126d1b13064855ac2cfa164381bb0

Authored by Miklos Szeredi
1 parent ce60a2f157

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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -1298,6 +1298,8 @@
1298 1298 if (vma->vm_flags & VM_MAYSHARE)
1299 1299 return -ENODEV;
1300 1300  
  1301 + invalidate_inode_pages2(file->f_mapping);
  1302 +
1301 1303 return generic_file_mmap(file, vma);
1302 1304 }
1303 1305