diff options
author | alc <alc@FreeBSD.org> | 2003-06-25 04:53:56 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-06-25 04:53:56 +0000 |
commit | a4f8c4746ab921c5e10269e83f950862f996bc67 (patch) | |
tree | debbe2e844a590b9c853c6ea8b6927100049a48f /sys | |
parent | 574e4a52cc31457455108ca946062d83a853d028 (diff) | |
download | FreeBSD-src-a4f8c4746ab921c5e10269e83f950862f996bc67.zip FreeBSD-src-a4f8c4746ab921c5e10269e83f950862f996bc67.tar.gz |
Maintain the lock on a vm object when calling vm_page_grab().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/swap_pager.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 763f237..f6ca7c7 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1701,10 +1701,8 @@ swp_pager_force_pagein(struct swblock *swap, int idx) VM_OBJECT_LOCK(object); vm_object_pip_add(object, 1); - VM_OBJECT_UNLOCK(object); m = vm_page_grab(object, pindex + idx, VM_ALLOC_NORMAL|VM_ALLOC_RETRY); if (m->valid == VM_PAGE_BITS_ALL) { - VM_OBJECT_LOCK(object); vm_object_pip_subtract(object, 1); VM_OBJECT_UNLOCK(object); vm_page_lock_queues(); @@ -1719,7 +1717,6 @@ swp_pager_force_pagein(struct swblock *swap, int idx) if (swap_pager_getpages(object, &m, 1, 0) != VM_PAGER_OK) panic("swap_pager_force_pagein: read from swap failed");/*XXX*/ - VM_OBJECT_LOCK(object); vm_object_pip_subtract(object, 1); VM_OBJECT_UNLOCK(object); |