diff options
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index b4c936485d11..0d4001eafd16 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -212,19 +212,18 @@ xfs_file_fsync( | |||
212 | } | 212 | } |
213 | 213 | ||
214 | #ifdef CONFIG_XFS_DMAPI | 214 | #ifdef CONFIG_XFS_DMAPI |
215 | STATIC struct page * | 215 | STATIC int |
216 | xfs_vm_nopage( | 216 | xfs_vm_fault( |
217 | struct vm_area_struct *area, | 217 | struct vm_area_struct *vma, |
218 | unsigned long address, | 218 | struct vm_fault *vmf) |
219 | int *type) | ||
220 | { | 219 | { |
221 | struct inode *inode = area->vm_file->f_path.dentry->d_inode; | 220 | struct inode *inode = vma->vm_file->f_path.dentry->d_inode; |
222 | bhv_vnode_t *vp = vn_from_inode(inode); | 221 | bhv_vnode_t *vp = vn_from_inode(inode); |
223 | 222 | ||
224 | ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); | 223 | ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); |
225 | if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), area, 0)) | 224 | if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), vma, 0)) |
226 | return NULL; | 225 | return VM_FAULT_SIGBUS; |
227 | return filemap_nopage(area, address, type); | 226 | return filemap_fault(vma, vmf); |
228 | } | 227 | } |
229 | #endif /* CONFIG_XFS_DMAPI */ | 228 | #endif /* CONFIG_XFS_DMAPI */ |
230 | 229 | ||
@@ -310,6 +309,7 @@ xfs_file_mmap( | |||
310 | struct vm_area_struct *vma) | 309 | struct vm_area_struct *vma) |
311 | { | 310 | { |
312 | vma->vm_ops = &xfs_file_vm_ops; | 311 | vma->vm_ops = &xfs_file_vm_ops; |
312 | vma->vm_flags |= VM_CAN_NONLINEAR; | ||
313 | 313 | ||
314 | #ifdef CONFIG_XFS_DMAPI | 314 | #ifdef CONFIG_XFS_DMAPI |
315 | if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) | 315 | if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) |
@@ -478,15 +478,13 @@ const struct file_operations xfs_dir_file_operations = { | |||
478 | }; | 478 | }; |
479 | 479 | ||
480 | static struct vm_operations_struct xfs_file_vm_ops = { | 480 | static struct vm_operations_struct xfs_file_vm_ops = { |
481 | .nopage = filemap_nopage, | 481 | .fault = filemap_fault, |
482 | .populate = filemap_populate, | ||
483 | .page_mkwrite = xfs_vm_page_mkwrite, | 482 | .page_mkwrite = xfs_vm_page_mkwrite, |
484 | }; | 483 | }; |
485 | 484 | ||
486 | #ifdef CONFIG_XFS_DMAPI | 485 | #ifdef CONFIG_XFS_DMAPI |
487 | static struct vm_operations_struct xfs_dmapi_file_vm_ops = { | 486 | static struct vm_operations_struct xfs_dmapi_file_vm_ops = { |
488 | .nopage = xfs_vm_nopage, | 487 | .fault = xfs_vm_fault, |
489 | .populate = filemap_populate, | ||
490 | .page_mkwrite = xfs_vm_page_mkwrite, | 488 | .page_mkwrite = xfs_vm_page_mkwrite, |
491 | #ifdef HAVE_VMOP_MPROTECT | 489 | #ifdef HAVE_VMOP_MPROTECT |
492 | .mprotect = xfs_vm_mprotect, | 490 | .mprotect = xfs_vm_mprotect, |