projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce60a2f
)
fuse: fix "direct_io" private mmap
author
Miklos Szeredi
<mszeredi@suse.cz>
Thu, 9 Apr 2009 15:37:53 +0000
(17:37 +0200)
committer
Miklos Szeredi
<mszeredi@suse.cz>
Thu, 9 Apr 2009 15:37:53 +0000
(17:37 +0200)
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>
fs/fuse/file.c
patch
|
blob
|
history
diff --git
a/fs/fuse/file.c
b/fs/fuse/file.c
index
0946861
..
06f30e9
100644
(file)
--- 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)
if (vma->vm_flags & VM_MAYSHARE)
return -ENODEV;
+ invalidate_inode_pages2(file->f_mapping);
+
return generic_file_mmap(file, vma);
}