From 870f481793b585323fbda3e87c54efc116f46351 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 9 Jan 2006 20:52:01 -0800 Subject: [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 Cc: Al Viro Cc: Anton Altaparmakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ocfs2/mmap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'fs/ocfs2/mmap.c') 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 = { .nopage = ocfs2_nopage, }; -int ocfs2_mmap(struct file *file, - struct vm_area_struct *vma) +int ocfs2_mmap(struct file *file, struct vm_area_struct *vma) { - struct address_space *mapping = file->f_dentry->d_inode->i_mapping; - struct inode *inode = mapping->host; - /* We don't want to support shared writable mappings yet. */ if (((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE)) && ((vma->vm_flags & VM_WRITE) || (vma->vm_flags & VM_MAYWRITE))) { @@ -95,7 +91,7 @@ int ocfs2_mmap(struct file *file, return -EINVAL; } - update_atime(inode); + file_accessed(file); vma->vm_ops = &ocfs2_file_vm_ops; return 0; } -- cgit