summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-01-21 14:42:00 +0000
committerjhb <jhb@FreeBSD.org>2009-01-21 14:42:00 +0000
commit47455a7b41fddec8ed401d12470434bd77477189 (patch)
treee58a2689a5a9b34097c0a3907a9c3f83d2c56940 /sys/kern/vfs_subr.c
parentfd1ff02af8d6981027dd9a4fa0fe479822e179a4 (diff)
downloadFreeBSD-src-47455a7b41fddec8ed401d12470434bd77477189.zip
FreeBSD-src-47455a7b41fddec8ed401d12470434bd77477189.tar.gz
Move the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
VOP_MARKATIME() since unlike the rest of VOP_SETATTR(), VA_MARKATIME can be performed while holding a shared vnode lock (the same functionality is done internally by VOP_READ which can run with a shared vnode lock). Add missing locking of the vnode interlock to the ufs implementation and remove a special note and test from the NFS client about not supporting the feature. Inspired by: ups Tested by: pho
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 1e4bf90..753f95f 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -4206,18 +4206,15 @@ vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off)
/*
* Mark for update the access time of the file if the filesystem
- * supports VA_MARK_ATIME. This functionality is used by execve
+ * supports VOP_MARKATIME. This functionality is used by execve
* and mmap, so we want to avoid the synchronous I/O implied by
* directly setting va_atime for the sake of efficiency.
*/
void
vfs_mark_atime(struct vnode *vp, struct ucred *cred)
{
- struct vattr atimeattr;
if ((vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0) {
- VATTR_NULL(&atimeattr);
- atimeattr.va_vaflags |= VA_MARK_ATIME;
- (void)VOP_SETATTR(vp, &atimeattr, cred);
+ (void)VOP_MARKATIME(vp);
}
}
OpenPOWER on IntegriCloud