summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-01-07 16:14:19 +0000
committerbde <bde@FreeBSD.org>1999-01-07 16:14:19 +0000
commit2facf6978aee7d6b1f5ca50f86f5a3784bf8dc19 (patch)
tree35574972d06a1d702f3f738ba45c782641845a3a /sys/gnu
parent9625424b5fb4fcb6b1736c570b2cdb8125017e32 (diff)
downloadFreeBSD-src-2facf6978aee7d6b1f5ca50f86f5a3784bf8dc19.zip
FreeBSD-src-2facf6978aee7d6b1f5ca50f86f5a3784bf8dc19.tar.gz
Don't pass unused unused timestamp args to UFS_UPDATE() or waste
time initializing them. This almost finishes centralizing (in-core) timestamp updates in ufs_itimes().
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_alloc.c7
-rw-r--r--sys/gnu/ext2fs/ext2_extern.h2
-rw-r--r--sys/gnu/ext2fs/ext2_inode.c14
-rw-r--r--sys/gnu/ext2fs/ext2_mount.h6
-rw-r--r--sys/gnu/ext2fs/ext2_readwrite.c7
-rw-r--r--sys/gnu/ext2fs/ext2_vnops.c26
-rw-r--r--sys/gnu/fs/ext2fs/ext2_alloc.c7
-rw-r--r--sys/gnu/fs/ext2fs/ext2_extern.h2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_inode.c14
-rw-r--r--sys/gnu/fs/ext2fs/ext2_mount.h6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_readwrite.c7
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vnops.c26
12 files changed, 42 insertions, 82 deletions
diff --git a/sys/gnu/ext2fs/ext2_alloc.c b/sys/gnu/ext2fs/ext2_alloc.c
index 186b227..0d4dfe3 100644
--- a/sys/gnu/ext2fs/ext2_alloc.c
+++ b/sys/gnu/ext2fs/ext2_alloc.c
@@ -232,7 +232,6 @@ return ENOSPC;
daddr_t start_lbn, end_lbn, soff, eoff, newblk, blkno;
struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
int i, len, start_lvl, end_lvl, pref, ssize;
- struct timeval tv;
vp = ap->a_vp;
ip = VTOI(vp);
@@ -339,10 +338,8 @@ return ENOSPC;
bwrite(sbp);
} else {
ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!doasyncfree) {
- gettime(&tv);
- UFS_UPDATE(vp, &tv, &tv, 1);
- }
+ if (!doasyncfree)
+ UFS_UPDATE(vp, 1);
}
if (ssize < len)
if (doasyncfree)
diff --git a/sys/gnu/ext2fs/ext2_extern.h b/sys/gnu/ext2fs/ext2_extern.h
index 0afd890..317f540 100644
--- a/sys/gnu/ext2fs/ext2_extern.h
+++ b/sys/gnu/ext2fs/ext2_extern.h
@@ -62,7 +62,7 @@ int ext2_reallocblks __P((struct vop_reallocblks_args *));
int ext2_reclaim __P((struct vop_reclaim_args *));
void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t));
int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
-int ext2_update __P((struct vnode *, struct timeval *, struct timeval *, int));
+int ext2_update __P((struct vnode *, int));
int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **));
int ext2_vfree __P((struct vnode *, ino_t, int));
int ext2_lookup __P((struct vop_cachedlookup_args *));
diff --git a/sys/gnu/ext2fs/ext2_inode.c b/sys/gnu/ext2fs/ext2_inode.c
index fedacbb..b287c16 100644
--- a/sys/gnu/ext2fs/ext2_inode.c
+++ b/sys/gnu/ext2fs/ext2_inode.c
@@ -80,10 +80,8 @@ ext2_init(struct vfsconf *vfsp)
* set, then wait for the write to complete.
*/
int
-ext2_update(vp, access, modify, waitfor)
+ext2_update(vp, waitfor)
struct vnode *vp;
- struct timeval *access;
- struct timeval *modify;
int waitfor;
{
register struct ext2_sb_info *fs;
@@ -143,7 +141,6 @@ ext2_truncate(vp, length, flags, cred, p)
struct buf *bp;
int offset, size, level;
long count, nblocks, blocksreleased = 0;
- struct timeval tv;
register int i;
int aflags, error, allerror;
off_t osize;
@@ -157,7 +154,6 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
return EFBIG;
oip = VTOI(ovp);
- getmicrotime(&tv);
if (ovp->v_type == VLNK &&
oip->i_size < ovp->v_mount->mnt_maxsymlinklen) {
#if DIAGNOSTIC
@@ -167,11 +163,11 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
bzero((char *)&oip->i_shortlink, (u_int)oip->i_size);
oip->i_size = 0;
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, &tv, &tv, 1));
+ return (UFS_UPDATE(ovp, 1));
}
if (oip->i_size == length) {
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, &tv, &tv, 0));
+ return (UFS_UPDATE(ovp, 0));
}
#if QUOTA
if (error = getinoquota(oip))
@@ -201,7 +197,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
else
bawrite(bp);
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, &tv, &tv, 1));
+ return (UFS_UPDATE(ovp, 1));
}
/*
* Shorten the size of the file. If the file is not being
@@ -257,7 +253,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
for (i = NDADDR - 1; i > lastblock; i--)
oip->i_db[i] = 0;
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- allerror = UFS_UPDATE(ovp, &tv, &tv, 1);
+ allerror = UFS_UPDATE(ovp, 1);
/*
* Having written the new inode to disk, save its new configuration
diff --git a/sys/gnu/ext2fs/ext2_mount.h b/sys/gnu/ext2fs/ext2_mount.h
index c62b736..70652b5 100644
--- a/sys/gnu/ext2fs/ext2_mount.h
+++ b/sys/gnu/ext2fs/ext2_mount.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufsmount.h 8.6 (Berkeley) 3/30/95
- * $Id: ufsmount.h,v 1.12 1997/10/16 20:32:40 phk Exp $
+ * $Id: ufsmount.h,v 1.13 1998/01/30 11:34:06 phk Exp $
*/
#ifndef _UFS_UFS_UFSMOUNT_H_
@@ -97,14 +97,14 @@ struct ufsmount {
struct malloc_type *um_malloctype; /* The inodes malloctype */
int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **));
int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
- int (*um_update) __P((struct vnode *, struct timeval *, struct timeval *, int));
+ int (*um_update) __P((struct vnode *, int));
int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **));
int (*um_vfree) __P((struct vnode *, ino_t, int));
};
#define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd)
#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee)
-#define UFS_UPDATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_update(aa, bb, cc, dd)
+#define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb)
#define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd)
#define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc)
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c
index 7efe39a..d5881e2 100644
--- a/sys/gnu/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/ext2fs/ext2_readwrite.c
@@ -173,7 +173,6 @@ WRITE(ap)
daddr_t lbn;
off_t osize;
int blkoffset, error, flags, ioflag, resid, size, xfersize;
- struct timeval tv;
ioflag = ap->a_ioflag;
uio = ap->a_uio;
@@ -289,9 +288,7 @@ WRITE(ap)
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
- } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) {
- getmicrotime(&tv);
- error = UFS_UPDATE(vp, &tv, &tv, 1);
- }
+ } else if (resid > uio->uio_resid && (ioflag & IO_SYNC))
+ error = UFS_UPDATE(vp, 1);
return (error);
}
diff --git a/sys/gnu/ext2fs/ext2_vnops.c b/sys/gnu/ext2fs/ext2_vnops.c
index 8b7ac7d..f3b9bcc 100644
--- a/sys/gnu/ext2fs/ext2_vnops.c
+++ b/sys/gnu/ext2fs/ext2_vnops.c
@@ -182,7 +182,6 @@ ext2_fsync(ap)
{
register struct vnode *vp = ap->a_vp;
register struct buf *bp;
- struct timeval tv;
struct buf *nbp;
int s;
@@ -229,8 +228,7 @@ loop:
#endif
}
splx(s);
- getmicrotime(&tv);
- return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT));
+ return (UFS_UPDATE(ap->a_vp, ap->a_waitfor == MNT_WAIT));
}
/*
@@ -320,7 +318,6 @@ ext2_link(ap)
struct componentname *cnp = ap->a_cnp;
struct proc *p = cnp->cn_proc;
struct inode *ip;
- struct timeval tv;
int error;
#ifdef DIAGNOSTIC
@@ -349,8 +346,7 @@ ext2_link(ap)
}
ip->i_nlink++;
ip->i_flag |= IN_CHANGE;
- getmicrotime(&tv);
- error = UFS_UPDATE(vp, &tv, &tv, 1);
+ error = UFS_UPDATE(vp, 1);
if (!error)
error = ext2_direnter(ip, tdvp, cnp);
if (error) {
@@ -389,7 +385,6 @@ ext2_rename(ap)
struct proc *p = fcnp->cn_proc;
struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
- struct timeval tv;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
u_char namlen;
@@ -527,8 +522,7 @@ abortit:
*/
ip->i_nlink++;
ip->i_flag |= IN_CHANGE;
- getmicrotime(&tv);
- if (error = UFS_UPDATE(fvp, &tv, &tv, 1)) {
+ if (error = UFS_UPDATE(fvp, 1)) {
VOP_UNLOCK(fvp, 0, p);
goto bad;
}
@@ -589,7 +583,7 @@ abortit:
}
dp->i_nlink++;
dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(tdvp, &tv, &tv, 1);
+ error = UFS_UPDATE(tdvp, 1);
if (error)
goto bad;
}
@@ -598,7 +592,7 @@ abortit:
if (doingdirectory && newparent) {
dp->i_nlink--;
dp->i_flag |= IN_CHANGE;
- (void)UFS_UPDATE(tdvp, &tv, &tv, 1);
+ (void)UFS_UPDATE(tdvp, 1);
}
goto bad;
}
@@ -807,7 +801,6 @@ ext2_mkdir(ap)
register struct inode *ip, *dp;
struct vnode *tvp;
struct dirtemplate dirtemplate, *dtp;
- struct timeval tv;
int error, dmode;
#ifdef DIAGNOSTIC
@@ -896,8 +889,7 @@ ext2_mkdir(ap)
ip->i_nlink = 2;
if (cnp->cn_flags & ISWHITEOUT)
ip->i_flags |= UF_OPAQUE;
- getmicrotime(&tv);
- error = UFS_UPDATE(tvp, &tv, &tv, 1);
+ error = UFS_UPDATE(tvp, 1);
/*
* Bump link count in parent directory
@@ -907,7 +899,7 @@ ext2_mkdir(ap)
*/
dp->i_nlink++;
dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(dvp, &tv, &tv, 1);
+ error = UFS_UPDATE(dvp, 1);
if (error)
goto bad;
@@ -1077,7 +1069,6 @@ ext2_makeinode(mode, dvp, vpp, cnp)
struct componentname *cnp;
{
register struct inode *ip, *pdir;
- struct timeval tv;
struct vnode *tvp;
int error;
@@ -1170,8 +1161,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
/*
* Make sure inode goes to disk before directory entry.
*/
- getmicrotime(&tv);
- error = UFS_UPDATE(tvp, &tv, &tv, 1);
+ error = UFS_UPDATE(tvp, 1);
if (error)
goto bad;
error = ext2_direnter(ip, dvp, cnp);
diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c
index 186b227..0d4dfe3 100644
--- a/sys/gnu/fs/ext2fs/ext2_alloc.c
+++ b/sys/gnu/fs/ext2fs/ext2_alloc.c
@@ -232,7 +232,6 @@ return ENOSPC;
daddr_t start_lbn, end_lbn, soff, eoff, newblk, blkno;
struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
int i, len, start_lvl, end_lvl, pref, ssize;
- struct timeval tv;
vp = ap->a_vp;
ip = VTOI(vp);
@@ -339,10 +338,8 @@ return ENOSPC;
bwrite(sbp);
} else {
ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!doasyncfree) {
- gettime(&tv);
- UFS_UPDATE(vp, &tv, &tv, 1);
- }
+ if (!doasyncfree)
+ UFS_UPDATE(vp, 1);
}
if (ssize < len)
if (doasyncfree)
diff --git a/sys/gnu/fs/ext2fs/ext2_extern.h b/sys/gnu/fs/ext2fs/ext2_extern.h
index 0afd890..317f540 100644
--- a/sys/gnu/fs/ext2fs/ext2_extern.h
+++ b/sys/gnu/fs/ext2fs/ext2_extern.h
@@ -62,7 +62,7 @@ int ext2_reallocblks __P((struct vop_reallocblks_args *));
int ext2_reclaim __P((struct vop_reclaim_args *));
void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t));
int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
-int ext2_update __P((struct vnode *, struct timeval *, struct timeval *, int));
+int ext2_update __P((struct vnode *, int));
int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **));
int ext2_vfree __P((struct vnode *, ino_t, int));
int ext2_lookup __P((struct vop_cachedlookup_args *));
diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c
index fedacbb..b287c16 100644
--- a/sys/gnu/fs/ext2fs/ext2_inode.c
+++ b/sys/gnu/fs/ext2fs/ext2_inode.c
@@ -80,10 +80,8 @@ ext2_init(struct vfsconf *vfsp)
* set, then wait for the write to complete.
*/
int
-ext2_update(vp, access, modify, waitfor)
+ext2_update(vp, waitfor)
struct vnode *vp;
- struct timeval *access;
- struct timeval *modify;
int waitfor;
{
register struct ext2_sb_info *fs;
@@ -143,7 +141,6 @@ ext2_truncate(vp, length, flags, cred, p)
struct buf *bp;
int offset, size, level;
long count, nblocks, blocksreleased = 0;
- struct timeval tv;
register int i;
int aflags, error, allerror;
off_t osize;
@@ -157,7 +154,6 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
return EFBIG;
oip = VTOI(ovp);
- getmicrotime(&tv);
if (ovp->v_type == VLNK &&
oip->i_size < ovp->v_mount->mnt_maxsymlinklen) {
#if DIAGNOSTIC
@@ -167,11 +163,11 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
bzero((char *)&oip->i_shortlink, (u_int)oip->i_size);
oip->i_size = 0;
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, &tv, &tv, 1));
+ return (UFS_UPDATE(ovp, 1));
}
if (oip->i_size == length) {
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, &tv, &tv, 0));
+ return (UFS_UPDATE(ovp, 0));
}
#if QUOTA
if (error = getinoquota(oip))
@@ -201,7 +197,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
else
bawrite(bp);
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, &tv, &tv, 1));
+ return (UFS_UPDATE(ovp, 1));
}
/*
* Shorten the size of the file. If the file is not being
@@ -257,7 +253,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
for (i = NDADDR - 1; i > lastblock; i--)
oip->i_db[i] = 0;
oip->i_flag |= IN_CHANGE | IN_UPDATE;
- allerror = UFS_UPDATE(ovp, &tv, &tv, 1);
+ allerror = UFS_UPDATE(ovp, 1);
/*
* Having written the new inode to disk, save its new configuration
diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h
index c62b736..70652b5 100644
--- a/sys/gnu/fs/ext2fs/ext2_mount.h
+++ b/sys/gnu/fs/ext2fs/ext2_mount.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufsmount.h 8.6 (Berkeley) 3/30/95
- * $Id: ufsmount.h,v 1.12 1997/10/16 20:32:40 phk Exp $
+ * $Id: ufsmount.h,v 1.13 1998/01/30 11:34:06 phk Exp $
*/
#ifndef _UFS_UFS_UFSMOUNT_H_
@@ -97,14 +97,14 @@ struct ufsmount {
struct malloc_type *um_malloctype; /* The inodes malloctype */
int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **));
int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
- int (*um_update) __P((struct vnode *, struct timeval *, struct timeval *, int));
+ int (*um_update) __P((struct vnode *, int));
int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **));
int (*um_vfree) __P((struct vnode *, ino_t, int));
};
#define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd)
#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee)
-#define UFS_UPDATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_update(aa, bb, cc, dd)
+#define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb)
#define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd)
#define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc)
diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c
index 7efe39a..d5881e2 100644
--- a/sys/gnu/fs/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/fs/ext2fs/ext2_readwrite.c
@@ -173,7 +173,6 @@ WRITE(ap)
daddr_t lbn;
off_t osize;
int blkoffset, error, flags, ioflag, resid, size, xfersize;
- struct timeval tv;
ioflag = ap->a_ioflag;
uio = ap->a_uio;
@@ -289,9 +288,7 @@ WRITE(ap)
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
- } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) {
- getmicrotime(&tv);
- error = UFS_UPDATE(vp, &tv, &tv, 1);
- }
+ } else if (resid > uio->uio_resid && (ioflag & IO_SYNC))
+ error = UFS_UPDATE(vp, 1);
return (error);
}
diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c
index 8b7ac7d..f3b9bcc 100644
--- a/sys/gnu/fs/ext2fs/ext2_vnops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vnops.c
@@ -182,7 +182,6 @@ ext2_fsync(ap)
{
register struct vnode *vp = ap->a_vp;
register struct buf *bp;
- struct timeval tv;
struct buf *nbp;
int s;
@@ -229,8 +228,7 @@ loop:
#endif
}
splx(s);
- getmicrotime(&tv);
- return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT));
+ return (UFS_UPDATE(ap->a_vp, ap->a_waitfor == MNT_WAIT));
}
/*
@@ -320,7 +318,6 @@ ext2_link(ap)
struct componentname *cnp = ap->a_cnp;
struct proc *p = cnp->cn_proc;
struct inode *ip;
- struct timeval tv;
int error;
#ifdef DIAGNOSTIC
@@ -349,8 +346,7 @@ ext2_link(ap)
}
ip->i_nlink++;
ip->i_flag |= IN_CHANGE;
- getmicrotime(&tv);
- error = UFS_UPDATE(vp, &tv, &tv, 1);
+ error = UFS_UPDATE(vp, 1);
if (!error)
error = ext2_direnter(ip, tdvp, cnp);
if (error) {
@@ -389,7 +385,6 @@ ext2_rename(ap)
struct proc *p = fcnp->cn_proc;
struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
- struct timeval tv;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
u_char namlen;
@@ -527,8 +522,7 @@ abortit:
*/
ip->i_nlink++;
ip->i_flag |= IN_CHANGE;
- getmicrotime(&tv);
- if (error = UFS_UPDATE(fvp, &tv, &tv, 1)) {
+ if (error = UFS_UPDATE(fvp, 1)) {
VOP_UNLOCK(fvp, 0, p);
goto bad;
}
@@ -589,7 +583,7 @@ abortit:
}
dp->i_nlink++;
dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(tdvp, &tv, &tv, 1);
+ error = UFS_UPDATE(tdvp, 1);
if (error)
goto bad;
}
@@ -598,7 +592,7 @@ abortit:
if (doingdirectory && newparent) {
dp->i_nlink--;
dp->i_flag |= IN_CHANGE;
- (void)UFS_UPDATE(tdvp, &tv, &tv, 1);
+ (void)UFS_UPDATE(tdvp, 1);
}
goto bad;
}
@@ -807,7 +801,6 @@ ext2_mkdir(ap)
register struct inode *ip, *dp;
struct vnode *tvp;
struct dirtemplate dirtemplate, *dtp;
- struct timeval tv;
int error, dmode;
#ifdef DIAGNOSTIC
@@ -896,8 +889,7 @@ ext2_mkdir(ap)
ip->i_nlink = 2;
if (cnp->cn_flags & ISWHITEOUT)
ip->i_flags |= UF_OPAQUE;
- getmicrotime(&tv);
- error = UFS_UPDATE(tvp, &tv, &tv, 1);
+ error = UFS_UPDATE(tvp, 1);
/*
* Bump link count in parent directory
@@ -907,7 +899,7 @@ ext2_mkdir(ap)
*/
dp->i_nlink++;
dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(dvp, &tv, &tv, 1);
+ error = UFS_UPDATE(dvp, 1);
if (error)
goto bad;
@@ -1077,7 +1069,6 @@ ext2_makeinode(mode, dvp, vpp, cnp)
struct componentname *cnp;
{
register struct inode *ip, *pdir;
- struct timeval tv;
struct vnode *tvp;
int error;
@@ -1170,8 +1161,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
/*
* Make sure inode goes to disk before directory entry.
*/
- getmicrotime(&tv);
- error = UFS_UPDATE(tvp, &tv, &tv, 1);
+ error = UFS_UPDATE(tvp, 1);
if (error)
goto bad;
error = ext2_direnter(ip, dvp, cnp);
OpenPOWER on IntegriCloud