aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-07-27 14:25:10 +0000
committerMark Johnston <markj@FreeBSD.org>2020-07-27 14:25:10 +0000
commit782ebde52ef5e51fe8fb5161e65c18c351537a20 (patch)
treeb358659456c4136d4fe1a32c43ec8df73643f8ff /sys/vm
parent58f5de0d8afaf8423b87a613a4a0772e56f8f72a (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index a7d6f3dd9d64..8c2df3e78e17 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1371,11 +1371,16 @@ vm_page_free_invalid(vm_page_t m)
KASSERT(vm_page_none_valid(m), ("page %p is valid", m));
KASSERT(!pmap_page_is_mapped(m), ("page %p is mapped", m));
- vm_page_assert_xbusied(m);
KASSERT(m->object != NULL, ("page %p has no object", m));
VM_OBJECT_ASSERT_WLOCKED(m->object);
/*
+ * We may be attempting to free the page as part of the handling for an
+ * I/O error, in which case the page was xbusied by a different thread.
+ */
+ vm_page_xbusy_claim(m);
+
+ /*
* If someone has wired this page while the object lock
* was not held, then the thread that unwires is responsible
* for freeing the page. Otherwise just free the page now.