diff options
author | alc <alc@FreeBSD.org> | 2004-04-24 23:23:36 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-04-24 23:23:36 +0000 |
commit | 899b7d067750036bbeac46e1d4d8c4d71f2b2cba (patch) | |
tree | a8ede766376bfbdf9c43e87a8b62892bb13ebdc0 /sys/vm | |
parent | 62793e142c94978239d4b6e11e9949130e4c3558 (diff) | |
download | FreeBSD-src-899b7d067750036bbeac46e1d4d8c4d71f2b2cba.zip FreeBSD-src-899b7d067750036bbeac46e1d4d8c4d71f2b2cba.tar.gz |
Add a VM_OBJECT_LOCK_ASSERT() call. Remove splvm() and splx() calls. Move
a comment.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/phys_pager.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index 3840004..a5fe74c 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -133,16 +133,16 @@ phys_pager_dealloc(vm_object_t object) } } +/* + * Fill as many pages as vm_fault has allocated for us. + */ static int phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) { - int i, s; + int i; - s = splvm(); + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); vm_page_lock_queues(); - /* - * Fill as many pages as vm_fault has allocated for us. - */ for (i = 0; i < count; i++) { if ((m[i]->flags & PG_ZERO) == 0) { vm_page_unlock_queues(); @@ -161,8 +161,6 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) } } vm_page_unlock_queues(); - splx(s); - return (VM_PAGER_OK); } |