Adjust where IN_MODIFIED and IN_ACCESSED are cleared (as in the FFS code).

This commit is contained in:
mycroft 2000-05-30 19:09:44 +00:00
parent 6764e5fc91
commit 719d6db0e2

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_inode.c,v 1.18 2000/05/29 18:34:36 mycroft Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.19 2000/05/30 19:09:44 mycroft Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@ -147,7 +147,6 @@ ext2fs_update(v)
flags = ip->i_flag & (IN_MODIFIED | IN_ACCESSED);
if (flags == 0)
return (0);
ip->i_flag &= ~flags;
fs = ip->i_e2fs;
error = bread(ip->i_devvp,
@ -157,10 +156,11 @@ ext2fs_update(v)
brelse(bp);
return (error);
}
ip->i_flag &= ~(IN_MODIFIED | IN_ACCESSED);
cp = (caddr_t)bp->b_data +
(ino_to_fsbo(fs, ip->i_number) * EXT2_DINODE_SIZE);
e2fs_isave(&ip->i_din.e2fs_din, (struct ext2fs_dinode *)cp);
if ((ap->a_flags & (UPDATE_WAIT|UPDATE_DIROP)) != 0&&
if ((ap->a_flags & (UPDATE_WAIT|UPDATE_DIROP)) != 0 &&
(flags & IN_MODIFIED) != 0 &&
(ap->a_vp->v_mount->mnt_flag & MNT_ASYNC) == 0)
return (bwrite(bp));