]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/mmap.c
[PATCH] NFS: Fix typo in nfs_get_client()
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / mmap.c
index afdeec4b0eefb2530cf9dba77cb1eaccaf8f91d1..83934e33e5b06de784e108672e552a4eb507feaf 100644 (file)
@@ -46,12 +46,12 @@ static struct page *ocfs2_nopage(struct vm_area_struct * area,
                                 unsigned long address,
                                 int *type)
 {
-       struct inode *inode = area->vm_file->f_dentry->d_inode;
        struct page *page = NOPAGE_SIGBUS;
        sigset_t blocked, oldset;
        int ret;
 
-       mlog_entry("(inode %lu, address %lu)\n", inode->i_ino, address);
+       mlog_entry("(area=%p, address=%lu, type=%p)\n", area, address,
+                  type);
 
        /* The best way to deal with signals in this path is
         * to block them upfront, rather than allowing the
@@ -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;
 }