aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/mmap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-09 23:52:01 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:30 -0500
commit870f481793b585323fbda3e87c54efc116f46351 (patch)
tree08dce269f14c18ae1b1682d3cb0f149b938d40bb /fs/ocfs2/mmap.c
parent3542c6e18f6470bad2bde1e94331e4f488a8d3f1 (diff)
[PATCH] replace inode_update_time with file_update_time
To allow various options to work per-mount instead of per-sb we need a struct vfsmount when updating ctime and mtime. This preparation patch replaces the inode_update_time routine with a file_update_atime routine so we can easily get at the vfsmount. (and the file makes more sense in this context anyway). Also get rid of the unused second argument - we always want to update the ctime when calling this routine. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@ftp.linux.org.uk> Cc: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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}