SCCS-vsn: sys/ufs/lfs/lfs_vnops.c 7.87
SCCS-vsn: sys/ufs/lfs/lfs_inode.c 7.71
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_inode.c 7.70 (Berkeley) %G%
+ * @(#)lfs_inode.c 7.71 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
register struct vnode *vp = ap->a_vp;
off_t length = ap->a_length;
struct buf *bp, *sup_bp;
register struct vnode *vp = ap->a_vp;
off_t length = ap->a_length;
struct buf *bp, *sup_bp;
struct ifile *ifp;
struct inode *ip;
struct lfs *fs;
struct ifile *ifp;
struct inode *ip;
struct lfs *fs;
}
/* If length is larger than the file, just update the times. */
}
/* If length is larger than the file, just update the times. */
if (ip->i_size <= length) {
ip->i_flag |= ICHG|IUPD;
if (ip->i_size <= length) {
ip->i_flag |= ICHG|IUPD;
- return (VOP_UPDATE(vp, &time, &time, 1));
+ return (VOP_UPDATE(vp, &tv, &tv, 1));
ip->i_blocks = 0;
ip->i_flag |= ICHG|IUPD;
e1 = vinvalbuf(vp, length > 0, ap->a_cred, ap->a_p);
ip->i_blocks = 0;
ip->i_flag |= ICHG|IUPD;
e1 = vinvalbuf(vp, length > 0, ap->a_cred, ap->a_p);
- e2 = VOP_UPDATE(vp, &time, &time, MNT_WAIT);
+ e2 = VOP_UPDATE(vp, &tv, &tv, MNT_WAIT);
return (e1 ? e1 : e2 ? e2 : 0);
}
return (e1 ? e1 : e2 ? e2 : 0);
}
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_vnops.c 7.86 (Berkeley) %G%
+ * @(#)lfs_vnops.c 7.87 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
register struct inode *ip = VTOI(vp);
register struct lfs *fs;
register ioflag = ap->a_ioflag;
register struct inode *ip = VTOI(vp);
register struct lfs *fs;
register ioflag = ap->a_ioflag;
struct buf *bp;
daddr_t lbn;
off_t osize;
struct buf *bp;
daddr_t lbn;
off_t osize;
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
- if (!error && (ioflag & IO_SYNC))
- error = VOP_UPDATE(vp, &time, &time, 1);
+ if (!error && (ioflag & IO_SYNC)) {
+ tv = time;
+ error = VOP_UPDATE(vp, &tv, &tv, 1);
+ }
struct proc *a_p;
} */ *ap;
{
struct proc *a_p;
} */ *ap;
{
#ifdef VERBOSE
printf("lfs_fsync\n");
#endif
#ifdef VERBOSE
printf("lfs_fsync\n");
#endif
- return (VOP_UPDATE(ap->a_vp, &time, &time, ap->a_waitfor == MNT_WAIT));
+ tv = time;
+ return (VOP_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT));
extern int prtactive;
register struct vnode *vp = ap->a_vp;
register struct inode *ip;
extern int prtactive;
register struct vnode *vp = ap->a_vp;
register struct inode *ip;
int mode, error;
#ifdef VERBOSE
int mode, error;
#ifdef VERBOSE
ip->i_flag |= IUPD|ICHG;
VOP_VFREE(vp, ip->i_number, mode);
}
ip->i_flag |= IUPD|ICHG;
VOP_VFREE(vp, ip->i_number, mode);
}
- if (ip->i_flag&(IUPD|IACC|ICHG|IMOD))
- VOP_UPDATE(vp, &time, &time, 0);
+ if (ip->i_flag&(IUPD|IACC|ICHG|IMOD)) {
+ tv = time;
+ VOP_UPDATE(vp, &tv, &tv, 0);
+ }
IUNLOCK(ip);
ip->i_flag = 0;
/*
IUNLOCK(ip);
ip->i_flag = 0;
/*