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
072e0e8455
commit
3e92715f78
@ -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 New Issue
Block a user