diff options
Diffstat (limited to 'sys/ufs/ffs/ffs_vnops.c')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 91d2c01..4d8d9ef 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -593,8 +593,11 @@ ffs_read(ap) } if ((error == 0 || uio->uio_resid != orig_resid) && - (vp->v_mount->mnt_flag & MNT_NOATIME) == 0) + (vp->v_mount->mnt_flag & MNT_NOATIME) == 0) { + VI_LOCK(vp); ip->i_flag |= IN_ACCESS; + VI_UNLOCK(vp); + } return (error); } @@ -989,8 +992,11 @@ ffs_extread(struct vnode *vp, struct uio *uio, int ioflag) } if ((error == 0 || uio->uio_resid != orig_resid) && - (vp->v_mount->mnt_flag & MNT_NOATIME) == 0) + (vp->v_mount->mnt_flag & MNT_NOATIME) == 0) { + VI_LOCK(vp); ip->i_flag |= IN_ACCESS; + VI_UNLOCK(vp); + } return (error); } |