SCCS-vsn: sys/ufs/ffs/ufs_vnops.c 7.102
SCCS-vsn: sys/ufs/ufs/ufs_vnops.c 7.102
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vnops.c 7.101 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.102 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
register struct vnode *tdvp = ap->a_tdvp;
register struct componentname *cnp = ap->a_cnp;
register struct inode *ip;
register struct vnode *tdvp = ap->a_tdvp;
register struct componentname *cnp = ap->a_cnp;
register struct inode *ip;
int error;
if (vp->v_mount != tdvp->v_mount) {
int error;
if (vp->v_mount != tdvp->v_mount) {
ILOCK(ip);
ip->i_nlink++;
ip->i_flag |= ICHG;
ILOCK(ip);
ip->i_nlink++;
ip->i_flag |= ICHG;
- error = VOP_UPDATE(tdvp, &time, &time, 1);
+ tv = time;
+ error = VOP_UPDATE(tdvp, &tv, &tv, 1);
if (!error)
error = ufs_direnter(ip, vp, cnp);
if (vp != tdvp)
if (!error)
error = ufs_direnter(ip, vp, cnp);
if (vp != tdvp)
register struct componentname *fcnp = ap->a_fcnp;
register struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
register struct componentname *fcnp = ap->a_fcnp;
register struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
int fdvpneedsrele = 1, tdvpneedsrele = 1;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
int fdvpneedsrele = 1, tdvpneedsrele = 1;
*/
ip->i_nlink++;
ip->i_flag |= ICHG;
*/
ip->i_nlink++;
ip->i_flag |= ICHG;
- error = VOP_UPDATE(fvp, &time, &time, 1);
+ tv = time;
+ error = VOP_UPDATE(fvp, &tv, &tv, 1);
}
dp->i_nlink++;
dp->i_flag |= ICHG;
}
dp->i_nlink++;
dp->i_flag |= ICHG;
- if (error = VOP_UPDATE(ITOV(dp), &time, &time, 1))
+ if (error = VOP_UPDATE(ITOV(dp), &tv, &tv, 1))
goto bad;
}
if (error = ufs_direnter(ip, tdvp, tcnp)) {
if (doingdirectory && newparent) {
dp->i_nlink--;
dp->i_flag |= ICHG;
goto bad;
}
if (error = ufs_direnter(ip, tdvp, tcnp)) {
if (doingdirectory && newparent) {
dp->i_nlink--;
dp->i_flag |= ICHG;
- (void)VOP_UPDATE(ITOV(dp), &time, &time, 1);
+ (void)VOP_UPDATE(ITOV(dp), &tv, &tv, 1);
register struct inode *ip, *dp;
struct vnode *tvp;
struct dirtemplate dirtemplate, *dtp;
register struct inode *ip, *dp;
struct vnode *tvp;
struct dirtemplate dirtemplate, *dtp;
- int error;
- int dmode;
+ struct timeval tv;
+ int error, dmode;
#ifdef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
#ifdef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
ip->i_mode = dmode;
ITOV(ip)->v_type = VDIR; /* Rest init'd in iget() */
ip->i_nlink = 2;
ip->i_mode = dmode;
ITOV(ip)->v_type = VDIR; /* Rest init'd in iget() */
ip->i_nlink = 2;
- error = VOP_UPDATE(ITOV(ip), &time, &time, 1);
+ tv = time;
+ error = VOP_UPDATE(ITOV(ip), &tv, &tv, 1);
/*
* Bump link count in parent directory
/*
* Bump link count in parent directory
*/
dp->i_nlink++;
dp->i_flag |= ICHG;
*/
dp->i_nlink++;
dp->i_flag |= ICHG;
- if (error = VOP_UPDATE(ITOV(dp), &time, &time, 1))
+ if (error = VOP_UPDATE(ITOV(dp), &tv, &tv, 1))
goto bad;
/* Initialize directory with "." and ".." from static template. */
goto bad;
/* Initialize directory with "." and ".." from static template. */
struct componentname *cnp;
{
register struct inode *ip, *pdir;
struct componentname *cnp;
{
register struct inode *ip, *pdir;
struct vnode *tvp;
int error;
struct vnode *tvp;
int error;
/*
* Make sure inode goes to disk before directory entry.
*/
/*
* Make sure inode goes to disk before directory entry.
*/
- if (error = VOP_UPDATE(tvp, &time, &time, 1))
+ tv = time;
+ if (error = VOP_UPDATE(tvp, &tv, &tv, 1))
goto bad;
if (error = ufs_direnter(ip, dvp, cnp))
goto bad;
goto bad;
if (error = ufs_direnter(ip, dvp, cnp))
goto bad;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vnops.c 7.101 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.102 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
register struct vnode *tdvp = ap->a_tdvp;
register struct componentname *cnp = ap->a_cnp;
register struct inode *ip;
register struct vnode *tdvp = ap->a_tdvp;
register struct componentname *cnp = ap->a_cnp;
register struct inode *ip;
int error;
if (vp->v_mount != tdvp->v_mount) {
int error;
if (vp->v_mount != tdvp->v_mount) {
ILOCK(ip);
ip->i_nlink++;
ip->i_flag |= ICHG;
ILOCK(ip);
ip->i_nlink++;
ip->i_flag |= ICHG;
- error = VOP_UPDATE(tdvp, &time, &time, 1);
+ tv = time;
+ error = VOP_UPDATE(tdvp, &tv, &tv, 1);
if (!error)
error = ufs_direnter(ip, vp, cnp);
if (vp != tdvp)
if (!error)
error = ufs_direnter(ip, vp, cnp);
if (vp != tdvp)
register struct componentname *fcnp = ap->a_fcnp;
register struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
register struct componentname *fcnp = ap->a_fcnp;
register struct inode *ip, *xp, *dp;
struct dirtemplate dirbuf;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
int fdvpneedsrele = 1, tdvpneedsrele = 1;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
int fdvpneedsrele = 1, tdvpneedsrele = 1;
*/
ip->i_nlink++;
ip->i_flag |= ICHG;
*/
ip->i_nlink++;
ip->i_flag |= ICHG;
- error = VOP_UPDATE(fvp, &time, &time, 1);
+ tv = time;
+ error = VOP_UPDATE(fvp, &tv, &tv, 1);
}
dp->i_nlink++;
dp->i_flag |= ICHG;
}
dp->i_nlink++;
dp->i_flag |= ICHG;
- if (error = VOP_UPDATE(ITOV(dp), &time, &time, 1))
+ if (error = VOP_UPDATE(ITOV(dp), &tv, &tv, 1))
goto bad;
}
if (error = ufs_direnter(ip, tdvp, tcnp)) {
if (doingdirectory && newparent) {
dp->i_nlink--;
dp->i_flag |= ICHG;
goto bad;
}
if (error = ufs_direnter(ip, tdvp, tcnp)) {
if (doingdirectory && newparent) {
dp->i_nlink--;
dp->i_flag |= ICHG;
- (void)VOP_UPDATE(ITOV(dp), &time, &time, 1);
+ (void)VOP_UPDATE(ITOV(dp), &tv, &tv, 1);
register struct inode *ip, *dp;
struct vnode *tvp;
struct dirtemplate dirtemplate, *dtp;
register struct inode *ip, *dp;
struct vnode *tvp;
struct dirtemplate dirtemplate, *dtp;
- int error;
- int dmode;
+ struct timeval tv;
+ int error, dmode;
#ifdef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
#ifdef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
ip->i_mode = dmode;
ITOV(ip)->v_type = VDIR; /* Rest init'd in iget() */
ip->i_nlink = 2;
ip->i_mode = dmode;
ITOV(ip)->v_type = VDIR; /* Rest init'd in iget() */
ip->i_nlink = 2;
- error = VOP_UPDATE(ITOV(ip), &time, &time, 1);
+ tv = time;
+ error = VOP_UPDATE(ITOV(ip), &tv, &tv, 1);
/*
* Bump link count in parent directory
/*
* Bump link count in parent directory
*/
dp->i_nlink++;
dp->i_flag |= ICHG;
*/
dp->i_nlink++;
dp->i_flag |= ICHG;
- if (error = VOP_UPDATE(ITOV(dp), &time, &time, 1))
+ if (error = VOP_UPDATE(ITOV(dp), &tv, &tv, 1))
goto bad;
/* Initialize directory with "." and ".." from static template. */
goto bad;
/* Initialize directory with "." and ".." from static template. */
struct componentname *cnp;
{
register struct inode *ip, *pdir;
struct componentname *cnp;
{
register struct inode *ip, *pdir;
struct vnode *tvp;
int error;
struct vnode *tvp;
int error;
/*
* Make sure inode goes to disk before directory entry.
*/
/*
* Make sure inode goes to disk before directory entry.
*/
- if (error = VOP_UPDATE(tvp, &time, &time, 1))
+ tv = time;
+ if (error = VOP_UPDATE(tvp, &tv, &tv, 1))
goto bad;
if (error = ufs_direnter(ip, dvp, cnp))
goto bad;
goto bad;
if (error = ufs_direnter(ip, dvp, cnp))
goto bad;