diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-01-17 16:10:55 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-26 18:02:01 -0400 |
commit | 89488984ac23b0580f959b9ee549f2fcb1c2f194 (patch) | |
tree | d839320eec53610c485f93fd922c2206fad25dd7 /fs/ocfs2 | |
parent | abf8b1569415bb4a8915a4884943ecd39c510957 (diff) |
ocfs2: Turn off shared writeable mmap for local files systems with holes.
This will be turned back on once we can do allocation in ->page_mkwrite().
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/mmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index 51b020447683..af01158b39f5 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c | |||
@@ -85,8 +85,11 @@ int ocfs2_mmap(struct file *file, struct vm_area_struct *vma) | |||
85 | int ret = 0, lock_level = 0; | 85 | int ret = 0, lock_level = 0; |
86 | struct ocfs2_super *osb = OCFS2_SB(file->f_dentry->d_inode->i_sb); | 86 | struct ocfs2_super *osb = OCFS2_SB(file->f_dentry->d_inode->i_sb); |
87 | 87 | ||
88 | /* We don't want to support shared writable mappings yet. */ | 88 | /* |
89 | if (!ocfs2_mount_local(osb) && | 89 | * Only support shared writeable mmap for local mounts which |
90 | * don't know about holes. | ||
91 | */ | ||
92 | if ((!ocfs2_mount_local(osb) || ocfs2_sparse_alloc(osb)) && | ||
90 | ((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE)) && | 93 | ((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE)) && |
91 | ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) { | 94 | ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) { |
92 | mlog(0, "disallow shared writable mmaps %lx\n", vma->vm_flags); | 95 | mlog(0, "disallow shared writable mmaps %lx\n", vma->vm_flags); |