Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Sep 2020 19:21:10 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365272 - head/sys/kern
Message-ID:  <202009021921.082JLAc1042870@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Wed Sep  2 19:21:10 2020
New Revision: 365272
URL: https://svnweb.freebsd.org/changeset/base/365272

Log:
  vfs: purge cache entries early on vgone
  
  There is no reason for them to linger across reclaim and it is an
  invariant that doomed vnodes are not added to the namecache.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed Sep  2 19:18:27 2020	(r365271)
+++ head/sys/kern/vfs_subr.c	Wed Sep  2 19:21:10 2020	(r365272)
@@ -3850,6 +3850,7 @@ vgonel(struct vnode *vp)
 		VNASSERT(vp->v_holdcnt > 0, vp, ("vnode without hold count"));
 		VI_UNLOCK(vp);
 	}
+	cache_purge_vgone(vp);
 	vfs_notify_upper(vp, VFS_NOTIFY_UPPER_RECLAIM);
 
 	/*
@@ -3923,7 +3924,6 @@ vgonel(struct vnode *vp)
 	 * Delete from old mount point vnode list.
 	 */
 	delmntque(vp);
-	cache_purge_vgone(vp);
 	/*
 	 * Done with purge, reset to the standard lock and invalidate
 	 * the vnode.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009021921.082JLAc1042870>