mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
Do not set IN_ACCESS flag for read-only mounts. The IN_ACCESS
survives remount in rw, also it is set for vnodes on rootfs before noatime can be set or clock is adjusted. All conditions result in wrong atime for accessed vnodes. Submitted by: bde MFC after: 1 week
This commit is contained in:
parent
9dc641f2d3
commit
df5c9c0411
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272952
@ -1762,7 +1762,7 @@ ext2_ind_read(struct vop_read_args *ap)
|
||||
}
|
||||
|
||||
if ((error == 0 || uio->uio_resid != orig_resid) &&
|
||||
(vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
|
||||
(vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0)
|
||||
ip->i_flag |= IN_ACCESS;
|
||||
return (error);
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ msdosfs_read(ap)
|
||||
brelse(bp);
|
||||
} while (error == 0 && uio->uio_resid > 0 && n != 0);
|
||||
if (!isadir && (error == 0 || uio->uio_resid != orig_resid) &&
|
||||
(vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
|
||||
(vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0)
|
||||
dep->de_flag |= DE_ACCESS;
|
||||
return (error);
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ 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 | MNT_RDONLY)) == 0 &&
|
||||
(ip->i_flag & IN_ACCESS) == 0) {
|
||||
VI_LOCK(vp);
|
||||
ip->i_flag |= IN_ACCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user