summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Lewis <truckman@FreeBSD.org>2003-05-16 19:46:51 +0000
committerDon Lewis <truckman@FreeBSD.org>2003-05-16 19:46:51 +0000
commit1e9bc9f889579db48eea9ad22dd63df216afb1b3 (patch)
tree2fc687109c77609add7b5d6c4f67a9fa6a40d277
parent5f616912b4ab278b113f89b11ca60a3c8e66d891 (diff)
Notes
-rw-r--r--sys/kern/vfs_subr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index ae9ef7fa1a76..14c29232f8a7 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2398,6 +2398,17 @@ loop:
mtx_unlock(&mntvnode_mtx);
vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY, td);
/*
+ * This vnode could have been reclaimed while we were
+ * waiting for the lock since we are not holding a
+ * reference.
+ * Start over if the vnode was reclaimed.
+ */
+ if (vp->v_mount != mp) {
+ VOP_UNLOCK(vp, 0, td);
+ mtx_lock(&mntvnode_mtx);
+ goto loop;
+ }
+ /*
* Skip over a vnodes marked VV_SYSTEM.
*/
if ((flags & SKIPSYSTEM) && (vp->v_vflag & VV_SYSTEM)) {