aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 92b2f225712f..f12e80a69c68 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -213,18 +213,19 @@ xfs_file_fsync(
213 213
214#ifdef CONFIG_XFS_DMAPI 214#ifdef CONFIG_XFS_DMAPI
215STATIC struct page * 215STATIC struct page *
216xfs_vm_nopage( 216xfs_vm_fault(
217 struct vm_area_struct *area, 217 struct vm_area_struct *vma,
218 unsigned long address, 218 struct fault_data *fdata)
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)) {
225 fdata->type = VM_FAULT_SIGBUS;
226 return NULL; 226 return NULL;
227 return filemap_nopage(area, address, type); 227 }
228 return filemap_fault(vma, fdata);
228} 229}
229#endif /* CONFIG_XFS_DMAPI */ 230#endif /* CONFIG_XFS_DMAPI */
230 231
@@ -310,7 +311,7 @@ xfs_file_mmap(
310 struct vm_area_struct *vma) 311 struct vm_area_struct *vma)
311{ 312{
312 vma->vm_ops = &xfs_file_vm_ops; 313 vma->vm_ops = &xfs_file_vm_ops;
313 vma->vm_flags |= VM_CAN_INVALIDATE; 314 vma->vm_flags |= VM_CAN_INVALIDATE | VM_CAN_NONLINEAR;
314 315
315#ifdef CONFIG_XFS_DMAPI 316#ifdef CONFIG_XFS_DMAPI
316 if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) 317 if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI)
@@ -465,14 +466,12 @@ const struct file_operations xfs_dir_file_operations = {
465}; 466};
466 467
467static struct vm_operations_struct xfs_file_vm_ops = { 468static struct vm_operations_struct xfs_file_vm_ops = {
468 .nopage = filemap_nopage, 469 .fault = filemap_fault,
469 .populate = filemap_populate,
470}; 470};
471 471
472#ifdef CONFIG_XFS_DMAPI 472#ifdef CONFIG_XFS_DMAPI
473static struct vm_operations_struct xfs_dmapi_file_vm_ops = { 473static struct vm_operations_struct xfs_dmapi_file_vm_ops = {
474 .nopage = xfs_vm_nopage, 474 .fault = xfs_vm_fault,
475 .populate = filemap_populate,
476#ifdef HAVE_VMOP_MPROTECT 475#ifdef HAVE_VMOP_MPROTECT
477 .mprotect = xfs_vm_mprotect, 476 .mprotect = xfs_vm_mprotect,
478#endif 477#endif