From 85af31a4646e2393c934cc4de2e7f6c8d38ecda4 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 28 Apr 2015 08:20:23 +0000 Subject: [PATCH] Do not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with the vnode locked. Review: https://reviews.freebsd.org/D2381 Submitted by: Conrad Meyer, Attilio Rao MFC after: 1 week --- sys/vm/vm_fault.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 13f46e14990..0c84d44c697 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -348,6 +348,10 @@ RetryFault:; vm_map_lock(fs.map); if (vm_map_lookup_entry(fs.map, vaddr, &fs.entry) && (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION)) { + if (fs.vp != NULL) { + vput(fs.vp); + fs.vp = NULL; + } fs.entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; vm_map_unlock_and_wait(fs.map, 0); } else