Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[linux-2.6-microblaze.git] / drivers / staging / lustre / lustre / llite / llite_mmap.c
index e72b14d..479bf42 100644 (file)
@@ -100,7 +100,7 @@ ll_fault_io_init(struct vm_area_struct *vma, struct lu_env **env_ret,
                 unsigned long *ra_flags)
 {
        struct file            *file = vma->vm_file;
-       struct inode           *inode = file->f_dentry->d_inode;
+       struct inode           *inode = file_inode(file);
        struct cl_io           *io;
        struct cl_fault_io     *fio;
        struct lu_env          *env;
@@ -213,7 +213,7 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage,
        cfs_restore_sigs(set);
 
        if (result == 0) {
-               struct inode *inode = vma->vm_file->f_dentry->d_inode;
+               struct inode *inode = file_inode(vma->vm_file);
                struct ll_inode_info *lli = ll_i2info(inode);
 
                lock_page(vmpage);
@@ -393,7 +393,7 @@ static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
                if (!printed && ++count > 16) {
                        CWARN("app(%s): the page %lu of file %lu is under heavy contention.\n",
                              current->comm, vmf->pgoff,
-                             vma->vm_file->f_dentry->d_inode->i_ino);
+                             file_inode(vma->vm_file)->i_ino);
                        printed = true;
                }
        } while (retry);
@@ -427,7 +427,7 @@ static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
  */
 static void ll_vm_open(struct vm_area_struct *vma)
 {
-       struct inode *inode    = vma->vm_file->f_dentry->d_inode;
+       struct inode *inode    = file_inode(vma->vm_file);
        struct ccc_object *vob = cl_inode2ccc(inode);
 
        LASSERT(vma->vm_file);
@@ -440,7 +440,7 @@ static void ll_vm_open(struct vm_area_struct *vma)
  */
 static void ll_vm_close(struct vm_area_struct *vma)
 {
-       struct inode      *inode = vma->vm_file->f_dentry->d_inode;
+       struct inode      *inode = file_inode(vma->vm_file);
        struct ccc_object *vob   = cl_inode2ccc(inode);
 
        LASSERT(vma->vm_file);
@@ -473,7 +473,7 @@ static const struct vm_operations_struct ll_file_vm_ops = {
 
 int ll_file_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file_inode(file);
        int rc;
 
        if (ll_file_nolock(file))