diff options
author | luoqi <luoqi@FreeBSD.org> | 1998-09-15 14:45:28 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1998-09-15 14:45:28 +0000 |
commit | 2ff38e0785e569ceeae6a04ee62fe47071ef7ea6 (patch) | |
tree | fe6f5946efda322c5463ae17a7aa4980c7c4d875 /sys/ufs | |
parent | b4308cdead71408fe5bffd2778fc9fd4ee4d610f (diff) | |
download | FreeBSD-src-2ff38e0785e569ceeae6a04ee62fe47071ef7ea6.zip FreeBSD-src-2ff38e0785e569ceeae6a04ee62fe47071ef7ea6.tar.gz |
Restore pre-v1.44 behavior: always copy modified in-core inode to disk
buffer. Otherwise some in-core inode changes might be lost, including
important meta data (e.g. size) if softupdates is enabled.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index c15c440..d990b2f 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_inode.c 8.13 (Berkeley) 4/21/95 - * $Id: ffs_inode.c,v 1.45 1998/07/03 22:16:57 bde Exp $ + * $Id: ffs_inode.c,v 1.46 1998/07/04 20:45:38 julian Exp $ */ #include "opt_quota.h" @@ -81,10 +81,12 @@ ffs_update(vp, access, modify, waitfor) struct inode *ip; int error; - ufs_itimes(vp); ip = VTOI(vp); - if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor != MNT_WAIT) + if (((ip->i_flag & + (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0) && + (waitfor != MNT_WAIT)) return (0); + ufs_itimes(vp); ip->i_flag &= ~(IN_LAZYMOD | IN_MODIFIED); if (vp->v_mount->mnt_flag & MNT_RDONLY) return (0); |