diff options
author | tegge <tegge@FreeBSD.org> | 2006-10-02 02:08:31 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-10-02 02:08:31 +0000 |
commit | 4877fa61ee44e981753afa66206de980ccd811ec (patch) | |
tree | 02a143294c6bdecb8530dec38e51611d73927176 /sys/ufs | |
parent | 4d26d3d4d7b97a3bbb360a06b061e0af9728920f (diff) | |
download | FreeBSD-src-4877fa61ee44e981753afa66206de980ccd811ec.zip FreeBSD-src-4877fa61ee44e981753afa66206de980ccd811ec.tar.gz |
Correct check for when IO_SYNC should be set for filesystem
not using softupdates when truncating a directory to zero length.
Discussed with: bde
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 2993443..768860a 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1214,7 +1214,7 @@ abortit: 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); |