aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/mmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-04 22:33:45 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-04 22:33:45 -0500
commit651857a1ecaf97a8ad9d324dd2a61675c53e541e (patch)
treef5b7e4915b25ae6910ede2bf37614ca98ab4f6e5 /fs/ocfs2/mmap.c
parentee28b0da1069ced1688aa9d0b7b378353b988321 (diff)
parentd38eb8db6aa359c060dfb72a29cf8d94a96657d8 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (31 commits) ocfs2: implement i_op->permission configfs: make configfs_dirent_exists() static ocfs2: update file system paths to set atime ocfs2: core atime update functions ocfs2: Add splice support ocfs2: Remove ocfs2_write_should_remove_suid() [PATCH] Export should_remove_suid() configfs: mutex_lock_nested() fix ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t ocfs2: remove handle argument to ocfs2_start_trans() ocfs2: remove ocfs2_journal_handle journal field ocfs2: pass ocfs2_super * into ocfs2_commit_trans() ocfs2: remove unused handle argument from ocfs2_meta_lock_full() ocfs2: make ocfs2_alloc_handle() static ocfs2: remove unused ocfs2_handle_add_lock() ocfs2: remove unused ocfs2_handle_add_inode() ocfs2: Don't allocate handle early in ocfs2_rename() ocfs2: don't use handle for locking in allocation functions ocfs2: don't pass handle to ocfs2_meta_lock in ocfs2_rename() ocfs2: don't pass handle to ocfs2_meta_lock in ocfs2_symlink() ...
Diffstat (limited to 'fs/ocfs2/mmap.c')
-rw-r--r--fs/ocfs2/mmap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c
index 83934e33e5b0..69f85ae392dc 100644
--- a/fs/ocfs2/mmap.c
+++ b/fs/ocfs2/mmap.c
@@ -82,6 +82,8 @@ static struct vm_operations_struct ocfs2_file_vm_ops = {
82 82
83int ocfs2_mmap(struct file *file, struct vm_area_struct *vma) 83int ocfs2_mmap(struct file *file, struct vm_area_struct *vma)
84{ 84{
85 int ret = 0, lock_level = 0;
86
85 /* We don't want to support shared writable mappings yet. */ 87 /* We don't want to support shared writable mappings yet. */
86 if (((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE)) 88 if (((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE))
87 && ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) { 89 && ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) {
@@ -91,7 +93,14 @@ int ocfs2_mmap(struct file *file, struct vm_area_struct *vma)
91 return -EINVAL; 93 return -EINVAL;
92 } 94 }
93 95
94 file_accessed(file); 96 ret = ocfs2_meta_lock_atime(file->f_dentry->d_inode,
97 file->f_vfsmnt, &lock_level);
98 if (ret < 0) {
99 mlog_errno(ret);
100 goto out;
101 }
102 ocfs2_meta_unlock(file->f_dentry->d_inode, lock_level);
103out:
95 vma->vm_ops = &ocfs2_file_vm_ops; 104 vma->vm_ops = &ocfs2_file_vm_ops;
96 return 0; 105 return 0;
97} 106}