MFC r300082:

For async UFS mounts, shrink the directory asynchronously, at least do
not pass IO_SYNC to ffs_truncate() unneccessary.
This commit is contained in:
kib 2016-05-24 10:39:55 +00:00
parent 5bd465c67d
commit 27b30b82a5

View File

@ -1131,7 +1131,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename)
if (tvp != NULL)
VOP_UNLOCK(tvp, 0);
error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff,
IO_NORMAL | IO_SYNC, cr);
IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr);
if (error != 0)
vprint("ufs_direnter: failed to truncate", dvp);
#ifdef UFS_DIRHASH