Revert previously added locking to tmpfs_mapped{read, write}.

This part needs to be overhauled anyway and this will be done in a
separate branch.
Just cope with changes to let the radix trie compile.
This commit is contained in:
attilio 2013-02-06 15:06:26 +00:00
parent 9d88c5279c
commit 8d96e275d2

View File

@ -511,14 +511,11 @@ tmpfs_mappedread(vm_object_t vobj, vm_object_t tobj, size_t len, struct uio *uio
offset = addr & PAGE_MASK;
tlen = MIN(PAGE_SIZE - offset, len);
if (vobj == NULL)
if ((vobj == NULL) ||
(vobj->resident_page_count == 0 && vm_object_cache_is_empty(vobj)))
goto nocache;
VM_OBJECT_LOCK(vobj);
if (vobj->resident_page_count == 0 && vm_object_cache_is_empty(vobj)) {
VM_OBJECT_UNLOCK(vobj);
goto nocache;
}
lookupvpg:
if (((m = vm_page_lookup(vobj, idx)) != NULL) &&
vm_page_is_valid(m, offset, tlen)) {
@ -642,17 +639,14 @@ tmpfs_mappedwrite(vm_object_t vobj, vm_object_t tobj, size_t len, struct uio *ui
offset = addr & PAGE_MASK;
tlen = MIN(PAGE_SIZE - offset, len);
if (vobj == NULL) {
if ((vobj == NULL) ||
(vobj->resident_page_count == 0 &&
vm_object_cache_is_empty(vobj))) {
vpg = NULL;
goto nocache;
}
VM_OBJECT_LOCK(vobj);
if (vobj->resident_page_count == 0 && vm_object_cache_is_empty(vobj)) {
VM_OBJECT_UNLOCK(vobj);
vpg = NULL;
goto nocache;
}
lookupvpg:
if (((vpg = vm_page_lookup(vobj, idx)) != NULL) &&
vm_page_is_valid(vpg, offset, tlen)) {