diff options
author | Nathan Scott <nathans@sgi.com> | 2006-06-09 00:52:13 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-09 00:52:13 -0400 |
commit | fbc1462bcb421620a04eb390fc79a2615c9d01d0 (patch) | |
tree | 106e95d7d933241c24b47af10299243a6f289bd4 /fs/xfs | |
parent | ba0b92d671c36cbebd66a306790c9b66a3224d83 (diff) |
[XFS] Fix a noatime regression related to updating inode atime field on
mmap only.
SGI-PV: 952736
SGI-Modid: xfs-linux-melb:xfs-kern:25922a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index c847416f6d10..7c9f7598807f 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -362,15 +362,10 @@ xfs_vm_nopage( | |||
362 | { | 362 | { |
363 | struct inode *inode = area->vm_file->f_dentry->d_inode; | 363 | struct inode *inode = area->vm_file->f_dentry->d_inode; |
364 | vnode_t *vp = vn_from_inode(inode); | 364 | vnode_t *vp = vn_from_inode(inode); |
365 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); | ||
366 | int error; | ||
367 | 365 | ||
368 | ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); | 366 | ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); |
369 | 367 | if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), area, 0)) | |
370 | error = XFS_SEND_MMAP(mp, area, 0); | ||
371 | if (error) | ||
372 | return NULL; | 368 | return NULL; |
373 | |||
374 | return filemap_nopage(area, address, type); | 369 | return filemap_nopage(area, address, type); |
375 | } | 370 | } |
376 | #endif /* CONFIG_XFS_DMAPI */ | 371 | #endif /* CONFIG_XFS_DMAPI */ |
@@ -456,23 +451,14 @@ xfs_file_mmap( | |||
456 | struct file *filp, | 451 | struct file *filp, |
457 | struct vm_area_struct *vma) | 452 | struct vm_area_struct *vma) |
458 | { | 453 | { |
459 | struct inode *ip = filp->f_dentry->d_inode; | ||
460 | vnode_t *vp = vn_from_inode(ip); | ||
461 | vattr_t vattr; | ||
462 | int error; | ||
463 | |||
464 | vma->vm_ops = &xfs_file_vm_ops; | 454 | vma->vm_ops = &xfs_file_vm_ops; |
465 | 455 | ||
466 | #ifdef CONFIG_XFS_DMAPI | 456 | #ifdef CONFIG_XFS_DMAPI |
467 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { | 457 | if (vn_from_inode(filp->f_dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) |
468 | vma->vm_ops = &xfs_dmapi_file_vm_ops; | 458 | vma->vm_ops = &xfs_dmapi_file_vm_ops; |
469 | } | ||
470 | #endif /* CONFIG_XFS_DMAPI */ | 459 | #endif /* CONFIG_XFS_DMAPI */ |
471 | 460 | ||
472 | vattr.va_mask = XFS_AT_UPDATIME; | 461 | file_accessed(filp); |
473 | VOP_SETATTR(vp, &vattr, XFS_AT_UPDATIME, NULL, error); | ||
474 | if (likely(!error)) | ||
475 | __vn_revalidate(vp, &vattr); /* update flags */ | ||
476 | return 0; | 462 | return 0; |
477 | } | 463 | } |
478 | 464 | ||