diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-09 11:37:53 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-09 11:37:53 -0400 |
commit | 3121bfe7631126d1b13064855ac2cfa164381bb0 (patch) | |
tree | 18cb4b7eba9783682df5d8c2799f87cbe55ca610 /fs/fuse/file.c | |
parent | ce60a2f15764f296b0467960759351702c7d2986 (diff) |
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>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 0946861b10b7..06f30e965676 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -1298,6 +1298,8 @@ static int fuse_direct_mmap(struct file *file, struct vm_area_struct *vma) | |||
1298 | if (vma->vm_flags & VM_MAYSHARE) | 1298 | if (vma->vm_flags & VM_MAYSHARE) |
1299 | return -ENODEV; | 1299 | return -ENODEV; |
1300 | 1300 | ||
1301 | invalidate_inode_pages2(file->f_mapping); | ||
1302 | |||
1301 | return generic_file_mmap(file, vma); | 1303 | return generic_file_mmap(file, vma); |
1302 | } | 1304 | } |
1303 | 1305 | ||