mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Performance improvment to minimize delayed write output of files
that have been deleted. Submitted by: Peter M. Chen <pmchen@eecs.umich.edu>
This commit is contained in:
parent
745b842305
commit
656b256cd5
1 changed files with 7 additions and 1 deletions
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
|
||||
* $Id: ufs_vnops.c,v 1.51 1997/06/02 06:24:51 julian Exp $
|
||||
* $Id: ufs_vnops.c,v 1.52 1997/07/13 16:26:40 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
|
|
@ -692,6 +692,12 @@ ufs_remove(ap)
|
|||
ip->i_flag |= IN_CHANGE;
|
||||
}
|
||||
out:
|
||||
if ((ip->i_nlink == 0) &&
|
||||
((vp->v_object == NULL) && (vp->v_usecount == 1)) ||
|
||||
(vp->v_usecount <= 2)) {
|
||||
VOP_TRUNCATE(vp, (off_t)0, 0, NOCRED, NULL);
|
||||
}
|
||||
|
||||
if (dvp == vp)
|
||||
vrele(vp);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue