summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index cef1a0f..5ecb4aa 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -610,12 +610,15 @@ retry:
VM_OBJECT_UNLOCK(object);
vrele(vp);
} else {
+ VM_OBJECT_LOCK(object);
if (object->flags & OBJ_DEAD) {
VOP_UNLOCK(vp, 0, td);
- tsleep(object, PVM, "vodead", 0);
+ msleep(object, VM_OBJECT_MTX(object), PDROP | PVM,
+ "vodead", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
goto retry;
}
+ VM_OBJECT_UNLOCK(object);
}
KASSERT(vp->v_object != NULL, ("vfs_object_create: NULL object"));
OpenPOWER on IntegriCloud