diff options
author | Alan Cox <alc@FreeBSD.org> | 2010-05-07 15:49:43 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2010-05-07 15:49:43 +0000 |
commit | 03679e233408833452145f89f49c5929842140d0 (patch) | |
tree | c95d39437ab8d8d820e5bf3ff157c2c97e2cf7d5 /sys/fs/nwfs | |
parent | dc510c105f9712a7b36ec428f3700f7e56f63450 (diff) | |
download | src-03679e233408833452145f89f49c5929842140d0.tar.gz src-03679e233408833452145f89f49c5929842140d0.zip |
Push down the page queues lock into vm_page_activate().
Notes
Notes:
svn path=/head/; revision=207746
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r-- | sys/fs/nwfs/nwfs_io.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 125201408adb..0bd7dc355ff2 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -446,9 +446,6 @@ nwfs_getpages(ap) nextoff = toff + PAGE_SIZE; m = pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); - if (nextoff <= size) { m->valid = VM_PAGE_BITS_ALL; KASSERT(m->dirty == 0, @@ -474,18 +471,22 @@ nwfs_getpages(ap) * now tell them that it is ok to use. */ if (!error) { - if (m->oflags & VPO_WANTED) + if (m->oflags & VPO_WANTED) { + vm_page_lock(m); vm_page_activate(m); - else + vm_page_unlock(m); + } else { + vm_page_lock(m); vm_page_deactivate(m); + vm_page_unlock(m); + } vm_page_wakeup(m); } else { + vm_page_lock(m); vm_page_free(m); + vm_page_unlock(m); } } - - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); return 0; |