diff options
author | kib <kib@FreeBSD.org> | 2016-05-24 10:39:55 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-05-24 10:39:55 +0000 |
commit | 27b30b82a5f6209227fa2e49fbde5a9825150689 (patch) | |
tree | 9e5e784d5a8303e21df4d40b417ac590b8eddf61 | |
parent | 5bd465c67ddc746a7ccaadbb4946207ae130a3b1 (diff) | |
download | FreeBSD-src-27b30b82a5f6209227fa2e49fbde5a9825150689.zip FreeBSD-src-27b30b82a5f6209227fa2e49fbde5a9825150689.tar.gz |
MFC r300082:
For async UFS mounts, shrink the directory asynchronously, at least do
not pass IO_SYNC to ffs_truncate() unneccessary.
-rw-r--r-- | sys/ufs/ufs/ufs_lookup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index f702dbf..c563300 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -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 |