svn commit: r311514 - stable/11/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Fri Jan 6 11:49:14 UTC 2017
Author: kib
Date: Fri Jan 6 11:49:13 2017
New Revision: 311514
URL: https://svnweb.freebsd.org/changeset/base/311514
Log:
MFC r310821:
Style.
Modified:
stable/11/sys/vm/vm_map.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/vm/vm_map.c
==============================================================================
--- stable/11/sys/vm/vm_map.c Fri Jan 6 11:46:24 2017 (r311513)
+++ stable/11/sys/vm/vm_map.c Fri Jan 6 11:49:13 2017 (r311514)
@@ -2929,8 +2929,8 @@ vm_map_entry_delete(vm_map_t map, vm_map
offidxstart = OFF_TO_IDX(entry->offset);
offidxend = offidxstart + count;
VM_OBJECT_WLOCK(object);
- if (object->ref_count != 1 &&
- ((object->flags & (OBJ_NOSPLIT|OBJ_ONEMAPPING)) == OBJ_ONEMAPPING ||
+ if (object->ref_count != 1 && ((object->flags & (OBJ_NOSPLIT |
+ OBJ_ONEMAPPING)) == OBJ_ONEMAPPING ||
object == kernel_object || object == kmem_object)) {
vm_object_collapse(object);
@@ -2943,7 +2943,8 @@ vm_map_entry_delete(vm_map_t map, vm_map
vm_object_page_remove(object, offidxstart, offidxend,
OBJPR_NOTMAPPED);
if (object->type == OBJT_SWAP)
- swap_pager_freespace(object, offidxstart, count);
+ swap_pager_freespace(object, offidxstart,
+ count);
if (offidxend >= object->size &&
offidxstart < object->size) {
size1 = object->size;
@@ -2951,8 +2952,9 @@ vm_map_entry_delete(vm_map_t map, vm_map
if (object->cred != NULL) {
size1 -= object->size;
KASSERT(object->charge >= ptoa(size1),
- ("vm_map_entry_delete: object->charge < 0"));
- swap_release_by_cred(ptoa(size1), object->cred);
+ ("object %p charge < 0", object));
+ swap_release_by_cred(ptoa(size1),
+ object->cred);
object->charge -= ptoa(size1);
}
}
@@ -3170,13 +3172,15 @@ vm_map_copy_entry(
if ((src_object = src_entry->object.vm_object) != NULL) {
VM_OBJECT_WLOCK(src_object);
charged = ENTRY_CHARGED(src_entry);
- if ((src_object->handle == NULL) &&
- (src_object->type == OBJT_DEFAULT ||
- src_object->type == OBJT_SWAP)) {
+ if (src_object->handle == NULL &&
+ (src_object->type == OBJT_DEFAULT ||
+ src_object->type == OBJT_SWAP)) {
vm_object_collapse(src_object);
- if ((src_object->flags & (OBJ_NOSPLIT|OBJ_ONEMAPPING)) == OBJ_ONEMAPPING) {
+ if ((src_object->flags & (OBJ_NOSPLIT |
+ OBJ_ONEMAPPING)) == OBJ_ONEMAPPING) {
vm_object_split(src_entry);
- src_object = src_entry->object.vm_object;
+ src_object =
+ src_entry->object.vm_object;
}
}
vm_object_reference_locked(src_object);
@@ -3203,8 +3207,10 @@ vm_map_copy_entry(
*fork_charge += size;
}
}
- src_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY);
- dst_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY);
+ src_entry->eflags |= MAP_ENTRY_COW |
+ MAP_ENTRY_NEEDS_COPY;
+ dst_entry->eflags |= MAP_ENTRY_COW |
+ MAP_ENTRY_NEEDS_COPY;
dst_entry->offset = src_entry->offset;
if (src_entry->eflags & MAP_ENTRY_VN_WRITECNT) {
/*
@@ -3827,10 +3833,10 @@ Retry:
rv = KERN_NO_SPACE;
/* Grow the underlying object if applicable. */
else if (stack_entry->object.vm_object == NULL ||
- vm_object_coalesce(stack_entry->object.vm_object,
- stack_entry->offset,
- (vm_size_t)(stack_entry->end - stack_entry->start),
- (vm_size_t)grow_amount, cred != NULL)) {
+ vm_object_coalesce(stack_entry->object.vm_object,
+ stack_entry->offset,
+ (vm_size_t)(stack_entry->end - stack_entry->start),
+ (vm_size_t)grow_amount, cred != NULL)) {
map->size += (addr - stack_entry->end);
/* Update the current entry. */
stack_entry->end = addr;
More information about the svn-src-stable
mailing list