diff options
Diffstat (limited to 'sys/fs/nwfs/nwfs_io.c')
-rw-r--r-- | sys/fs/nwfs/nwfs_io.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 75b1c18..ef1c800 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -449,12 +449,14 @@ nwfs_getpages(ap) size = count - uio.uio_resid; - vm_page_lock_queues(); for (i = 0, toff = 0; i < npages; i++, toff = nextoff) { vm_page_t m; 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, @@ -489,8 +491,10 @@ nwfs_getpages(ap) vm_page_free(m); } } + + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return 0; #endif /* NWFS_RWCACHE */ |