summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-05-02 18:36:52 +0000
committerkib <kib@FreeBSD.org>2013-05-02 18:36:52 +0000
commit3a177062d539e9291599fc04488ad378853d27ec (patch)
tree19ce6b23c8098cd90bcd76b6393cd18abc0d04ec /sys/fs
parentfc1170cbc9b55f5c8d2505edda58499bacab52bc (diff)
downloadFreeBSD-src-3a177062d539e9291599fc04488ad378853d27ec.zip
FreeBSD-src-3a177062d539e9291599fc04488ad378853d27ec.tar.gz
The page read or written could be wired. Do not requeue if the page
is not on a queue. Reported and tested by: pho Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index 134f8d9..029aefb 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -494,7 +494,8 @@ tmpfs_nocacheread(vm_object_t tobj, vm_pindex_t idx,
vm_page_unhold(m);
vm_page_deactivate(m);
/* Requeue to maintain LRU ordering. */
- vm_page_requeue(m);
+ if (m->queue != PQ_NONE)
+ vm_page_requeue(m);
vm_page_unlock(m);
VM_OBJECT_WUNLOCK(tobj);
@@ -609,7 +610,8 @@ tmpfs_mappedwrite(vm_object_t tobj, size_t len, struct uio *uio)
vm_page_unhold(tpg);
vm_page_deactivate(tpg);
/* Requeue to maintain LRU ordering. */
- vm_page_requeue(tpg);
+ if (tpg->queue != PQ_NONE)
+ vm_page_requeue(tpg);
vm_page_unlock(tpg);
VM_OBJECT_WUNLOCK(tobj);
OpenPOWER on IntegriCloud