diff options
Diffstat (limited to 'sys/ufs/lfs')
-rw-r--r-- | sys/ufs/lfs/lfs_inode.c | 11 | ||||
-rw-r--r-- | sys/ufs/lfs/lfs_vnops.c | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/ufs/lfs/lfs_inode.c b/sys/ufs/lfs/lfs_inode.c index 0d39b5b418d..4e2c15c5dde 100644 --- a/sys/ufs/lfs/lfs_inode.c +++ b/sys/ufs/lfs/lfs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lfs_inode.c,v 1.9 2003/06/02 23:28:23 millert Exp $ */ +/* $OpenBSD: lfs_inode.c,v 1.10 2004/06/24 19:35:27 tholo Exp $ */ /* $NetBSD: lfs_inode.c,v 1.5 1996/05/11 18:27:35 mycroft Exp $ */ /* @@ -102,8 +102,11 @@ lfs_update(v) (ip)->i_modrev++; } if (ip->i_flag & IN_CHANGE) { - ip->i_ctime = time.tv_sec; - ip->i_ctimensec = time.tv_usec * 1000; + struct timespec ts; + + getnanotime(&ts); + ip->i_ctime = ts.tv_sec; + ip->i_ctimensec = ts.tv_nsec; } ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); @@ -172,7 +175,7 @@ lfs_truncate(v) int e1, e2, depth, lastseg, num, offset, seg, freesize; ip = VTOI(vp); - TIMEVAL_TO_TIMESPEC(&time, &ts); + getnanotime(&ts); if (vp->v_type == VLNK && vp->v_mount->mnt_maxsymlinklen > 0) { #ifdef DIAGNOSTIC if (length != 0) diff --git a/sys/ufs/lfs/lfs_vnops.c b/sys/ufs/lfs/lfs_vnops.c index b0bf6c05aff..05f02d97493 100644 --- a/sys/ufs/lfs/lfs_vnops.c +++ b/sys/ufs/lfs/lfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lfs_vnops.c,v 1.10 2003/09/23 16:51:13 millert Exp $ */ +/* $OpenBSD: lfs_vnops.c,v 1.11 2004/06/24 19:35:27 tholo Exp $ */ /* $NetBSD: lfs_vnops.c,v 1.11 1996/05/11 18:27:41 mycroft Exp $ */ /* @@ -176,7 +176,7 @@ lfs_fsync(v) } */ *ap = v; struct timespec ts; - TIMEVAL_TO_TIMESPEC(&time, &ts); + getnanotime(&ts); return (VOP_UPDATE(ap->a_vp, &ts, &ts, ap->a_waitfor == MNT_WAIT ? LFS_SYNC : 0)); } |