diff options
author | bde <bde@FreeBSD.org> | 1995-08-25 19:40:32 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-08-25 19:40:32 +0000 |
commit | 0bdfde4001c01a83bd551bec571a21fe016f55f2 (patch) | |
tree | 9ab308e9e6d1a6f578e70303dd14ccae587b7ee7 /sys/ufs | |
parent | c7d155d78afb88cc8abf9bf5193ce4c24a59ae09 (diff) | |
download | FreeBSD-src-0bdfde4001c01a83bd551bec571a21fe016f55f2.zip FreeBSD-src-0bdfde4001c01a83bd551bec571a21fe016f55f2.tar.gz |
Don't call VOP_UPDATE() with volatile timestamps.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 9 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_readwrite.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index f5b9edc..dc68aae 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94 - * $Id: ffs_alloc.c,v 1.14 1995/05/30 08:14:57 rgrimes Exp $ + * $Id: ffs_alloc.c,v 1.15 1995/08/07 08:16:32 davidg Exp $ */ #include <sys/param.h> @@ -345,6 +345,7 @@ ffs_reallocblks(ap) daddr_t start_lbn, end_lbn, soff, 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); @@ -449,8 +450,10 @@ ffs_reallocblks(ap) bwrite(sbp); } else { ip->i_flag |= IN_CHANGE | IN_UPDATE; - if (!doasyncfree) - VOP_UPDATE(vp, &time, &time, 1); + if (!doasyncfree) { + tv = time; + VOP_UPDATE(vp, &tv, &tv, 1); + } } if (ssize < len) if (doasyncfree) diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index 5b273be..a497caa 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_readwrite.c 8.7 (Berkeley) 1/21/94 - * $Id: ufs_readwrite.c,v 1.8 1995/04/09 06:03:44 davidg Exp $ + * $Id: ufs_readwrite.c,v 1.9 1995/04/24 05:13:15 dyson Exp $ */ #ifdef LFS_READWRITE @@ -181,6 +181,7 @@ 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; @@ -306,7 +307,9 @@ WRITE(ap) uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } - } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) - error = VOP_UPDATE(vp, &time, &time, 1); + } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { + tv = time; + error = VOP_UPDATE(vp, &tv, &tv, 1); + } return (error); } |