aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/mmap.c')
-rw-r--r--fs/ocfs2/mmap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c
index afdeec4b0eef..843cf9ddefe8 100644
--- a/fs/ocfs2/mmap.c
+++ b/fs/ocfs2/mmap.c
@@ -80,12 +80,8 @@ static struct vm_operations_struct ocfs2_file_vm_ops = {
80 .nopage = ocfs2_nopage, 80 .nopage = ocfs2_nopage,
81}; 81};
82 82
83int ocfs2_mmap(struct file *file, 83int ocfs2_mmap(struct file *file, struct vm_area_struct *vma)
84 struct vm_area_struct *vma)
85{ 84{
86 struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
87 struct inode *inode = mapping->host;
88
89 /* We don't want to support shared writable mappings yet. */ 85 /* We don't want to support shared writable mappings yet. */
90 if (((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE)) 86 if (((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE))
91 && ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) { 87 && ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) {
@@ -95,7 +91,7 @@ int ocfs2_mmap(struct file *file,
95 return -EINVAL; 91 return -EINVAL;
96 } 92 }
97 93
98 update_atime(inode); 94 file_accessed(file);
99 vma->vm_ops = &ocfs2_file_vm_ops; 95 vma->vm_ops = &ocfs2_file_vm_ops;
100 return 0; 96 return 0;
101} 97}