diff options
author | phk <phk@FreeBSD.org> | 2004-09-07 09:17:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-09-07 09:17:05 +0000 |
commit | 1912367ebb1a5029d72a6b3b028c32f0af41f0b5 (patch) | |
tree | 7e7bb052b21a301fd0dd0598358f0d815c6f142b /sys/ufs | |
parent | 9f1a2f23b212c00fcbf88247ae9b3f80903955ce (diff) | |
download | FreeBSD-src-1912367ebb1a5029d72a6b3b028c32f0af41f0b5.zip FreeBSD-src-1912367ebb1a5029d72a6b3b028c32f0af41f0b5.tar.gz |
Create simple function init_va_filerev() for initializing a va_filerev
field.
Replace three instances of longhaired initialization va_filerev fields.
Added XXX comment wondering why we don't use random bits instead of
uptime of the system for this purpose.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8509bc1..b09f957 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -117,23 +117,6 @@ static int filt_ufsvnode(struct knote *kn, long hint); static void filt_ufsdetach(struct knote *kn); static int ufs_kqfilter(struct vop_kqfilter_args *ap); -union _qcvt { - int64_t qcvt; - int32_t val[2]; -}; -#define SETHIGH(q, h) { \ - union _qcvt tmp; \ - tmp.qcvt = (q); \ - tmp.val[_QUAD_HIGHWORD] = (h); \ - (q) = tmp.qcvt; \ -} -#define SETLOW(q, l) { \ - union _qcvt tmp; \ - tmp.qcvt = (q); \ - tmp.val[_QUAD_LOWWORD] = (l); \ - (q) = tmp.qcvt; \ -} - /* * A virgin directory (no blushing please). */ @@ -2321,7 +2304,6 @@ ufs_vinit(mntp, specops, fifoops, vpp) { struct inode *ip; struct vnode *vp; - struct timeval tv; vp = *vpp; ip = VTOI(vp); @@ -2342,12 +2324,7 @@ ufs_vinit(mntp, specops, fifoops, vpp) ASSERT_VOP_LOCKED(vp, "ufs_vinit"); if (ip->i_number == ROOTINO) vp->v_vflag |= VV_ROOT; - /* - * Initialize modrev times - */ - getmicrouptime(&tv); - SETHIGH(ip->i_modrev, tv.tv_sec); - SETLOW(ip->i_modrev, tv.tv_usec * 4294); + ip->i_modrev = init_va_filerev(); *vpp = vp; return (0); } |