summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-05-03 20:31:13 +0000
committerkib <kib@FreeBSD.org>2010-05-03 20:31:13 +0000
commit44c384aeff9f351d68878b89edebf255a4d96fe8 (patch)
tree41e82776e29be9a0454c9f015858821f979ee83e /sys/fs/smbfs
parent6ca323ef63a448a489c16f9cbb57db639aa48201 (diff)
downloadFreeBSD-src-44c384aeff9f351d68878b89edebf255a4d96fe8.zip
FreeBSD-src-44c384aeff9f351d68878b89edebf255a4d96fe8.tar.gz
Lock the page around vm_page_activate() and vm_page_deactivate() calls
where it was missed. The wrapped fragments now protect wire_count with page lock. Reviewed by: alc
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r--sys/fs/smbfs/smbfs_io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index df779a6..6537ed4 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -500,12 +500,14 @@ smbfs_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) {
/*
* Read operation filled an entire page
@@ -553,8 +555,10 @@ smbfs_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 /* SMBFS_RWGENERIC */
OpenPOWER on IntegriCloud