From f279b88deb98bb709182f4c768e6802f0c99fa36 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 13 Apr 2003 00:43:48 +0000 Subject: [PATCH] Permit vm_object_pip_add() and vm_object_pip_wakeup() on the kmem_object without Giant held. --- sys/vm/vm_object.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 21112681adde..6f76a2d59133 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -268,7 +268,8 @@ vm_object_clear_flag(vm_object_t object, u_short bits) void vm_object_pip_add(vm_object_t object, short i) { - GIANT_REQUIRED; + + mtx_assert(object == kmem_object ? &object->mtx : &Giant, MA_OWNED); object->paging_in_progress += i; } @@ -282,7 +283,8 @@ vm_object_pip_subtract(vm_object_t object, short i) void vm_object_pip_wakeup(vm_object_t object) { - GIANT_REQUIRED; + + mtx_assert(object == kmem_object ? &object->mtx : &Giant, MA_OWNED); object->paging_in_progress--; if ((object->flags & OBJ_PIPWNT) && object->paging_in_progress == 0) { vm_object_clear_flag(object, OBJ_PIPWNT);