Correct check for when IO_SYNC should be set for filesystem

not using softupdates when truncating a directory to zero length.

Discussed with:	bde
This commit is contained in:
tegge 2006-10-02 02:08:31 +00:00
parent 4d26d3d4d7
commit 4877fa61ee

View File

@ -1214,7 +1214,7 @@ ufs_rename(ap)
DIP_SET(xp, i_nlink, xp->i_nlink);
xp->i_flag |= IN_CHANGE;
ioflag = IO_NORMAL;
if (DOINGASYNC(tvp))
if (!DOINGASYNC(tvp))
ioflag |= IO_SYNC;
if ((error = UFS_TRUNCATE(tvp, (off_t)0, ioflag,
tcnp->cn_cred, tcnp->cn_thread)) != 0)
@ -1721,7 +1721,7 @@ ufs_rmdir(ap)
DIP_SET(ip, i_nlink, ip->i_nlink);
ip->i_flag |= IN_CHANGE;
ioflag = IO_NORMAL;
if (DOINGASYNC(vp))
if (!DOINGASYNC(vp))
ioflag |= IO_SYNC;
error = UFS_TRUNCATE(vp, (off_t)0, ioflag, cnp->cn_cred,
cnp->cn_thread);