diff options
Diffstat (limited to 'fs/ocfs2/mmap.c')
-rw-r--r-- | fs/ocfs2/mmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index 47a87dda54ce..07c585b85000 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c | |||
@@ -62,7 +62,7 @@ static int __ocfs2_page_mkwrite(struct file *file, struct buffer_head *di_bh, | |||
62 | struct page *page) | 62 | struct page *page) |
63 | { | 63 | { |
64 | int ret = VM_FAULT_NOPAGE; | 64 | int ret = VM_FAULT_NOPAGE; |
65 | struct inode *inode = file->f_path.dentry->d_inode; | 65 | struct inode *inode = file_inode(file); |
66 | struct address_space *mapping = inode->i_mapping; | 66 | struct address_space *mapping = inode->i_mapping; |
67 | loff_t pos = page_offset(page); | 67 | loff_t pos = page_offset(page); |
68 | unsigned int len = PAGE_CACHE_SIZE; | 68 | unsigned int len = PAGE_CACHE_SIZE; |
@@ -131,7 +131,7 @@ out: | |||
131 | static int ocfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | 131 | static int ocfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
132 | { | 132 | { |
133 | struct page *page = vmf->page; | 133 | struct page *page = vmf->page; |
134 | struct inode *inode = vma->vm_file->f_path.dentry->d_inode; | 134 | struct inode *inode = file_inode(vma->vm_file); |
135 | struct buffer_head *di_bh = NULL; | 135 | struct buffer_head *di_bh = NULL; |
136 | sigset_t oldset; | 136 | sigset_t oldset; |
137 | int ret; | 137 | int ret; |
@@ -180,13 +180,13 @@ int ocfs2_mmap(struct file *file, struct vm_area_struct *vma) | |||
180 | { | 180 | { |
181 | int ret = 0, lock_level = 0; | 181 | int ret = 0, lock_level = 0; |
182 | 182 | ||
183 | ret = ocfs2_inode_lock_atime(file->f_dentry->d_inode, | 183 | ret = ocfs2_inode_lock_atime(file_inode(file), |
184 | file->f_vfsmnt, &lock_level); | 184 | file->f_vfsmnt, &lock_level); |
185 | if (ret < 0) { | 185 | if (ret < 0) { |
186 | mlog_errno(ret); | 186 | mlog_errno(ret); |
187 | goto out; | 187 | goto out; |
188 | } | 188 | } |
189 | ocfs2_inode_unlock(file->f_dentry->d_inode, lock_level); | 189 | ocfs2_inode_unlock(file_inode(file), lock_level); |
190 | out: | 190 | out: |
191 | vma->vm_ops = &ocfs2_file_vm_ops; | 191 | vma->vm_ops = &ocfs2_file_vm_ops; |
192 | return 0; | 192 | return 0; |