Avoid an unnecessary memory dereference in vm_map_entry_splay().
This commit is contained in:
parent
e7f54c1b71
commit
7438d60b4b
@ -737,9 +737,9 @@ vm_map_entry_splay(vm_offset_t addr, vm_map_entry_t root)
|
||||
rlist = root;
|
||||
root = y;
|
||||
}
|
||||
} else {
|
||||
} else if (addr >= root->end) {
|
||||
y = root->right;
|
||||
if (addr < root->end || y == NULL)
|
||||
if (y == NULL)
|
||||
break;
|
||||
if (addr >= y->end && y->right != NULL) {
|
||||
/* Rotate left and put y on llist. */
|
||||
@ -755,7 +755,8 @@ vm_map_entry_splay(vm_offset_t addr, vm_map_entry_t root)
|
||||
llist = root;
|
||||
root = y;
|
||||
}
|
||||
}
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user