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/nfsclient | |
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/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 37da34b8cce3..e85fab8975d7 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -194,9 +194,6 @@ nfs_getpages(struct vop_getpages_args *ap) nextoff = toff + PAGE_SIZE; m = pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); - if (nextoff <= size) { /* * Read operation filled an entire page @@ -234,18 +231,22 @@ nfs_getpages(struct vop_getpages_args *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); |