new helper: file_inode(file)
[linux-block.git] / kernel / fork.c
index c535f33bbb9c9ad108c394618474bbbce1f64f86..4ff724f81f2529b6fe206f6fa081198cc3f0d70a 100644 (file)
@@ -413,7 +413,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
                tmp->vm_next = tmp->vm_prev = NULL;
                file = tmp->vm_file;
                if (file) {
-                       struct inode *inode = file->f_path.dentry->d_inode;
+                       struct inode *inode = file_inode(file);
                        struct address_space *mapping = file->f_mapping;
 
                        get_file(file);