vm: remove no longer needed atomic_load_ptr casts
This commit is contained in:
parent
92ab0e7002
commit
87ec18049e
@ -895,8 +895,7 @@ kern_mincore(struct thread *td, uintptr_t addr0, size_t len, char *vec)
|
||||
while (object == NULL || m->object != object) {
|
||||
if (object != NULL)
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
object = (vm_object_t)atomic_load_ptr(
|
||||
&m->object);
|
||||
object = atomic_load_ptr(&m->object);
|
||||
if (object == NULL)
|
||||
goto retry;
|
||||
VM_OBJECT_WLOCK(object);
|
||||
|
@ -2500,8 +2500,7 @@ vm_page_scan_contig(u_long npages, vm_page_t m_start, vm_page_t m_end,
|
||||
pa);
|
||||
}
|
||||
#endif
|
||||
else if ((object =
|
||||
(vm_object_t)atomic_load_ptr(&m->object)) != NULL) {
|
||||
else if ((object = atomic_load_ptr(&m->object)) != NULL) {
|
||||
/*
|
||||
* The page is considered eligible for relocation if
|
||||
* and only if it could be laundered or reclaimed by
|
||||
@ -2643,8 +2642,7 @@ vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run,
|
||||
*/
|
||||
if (vm_page_wired(m))
|
||||
error = EBUSY;
|
||||
else if ((object =
|
||||
(vm_object_t)atomic_load_ptr(&m->object)) != NULL) {
|
||||
else if ((object = atomic_load_ptr(&m->object)) != NULL) {
|
||||
/*
|
||||
* The page is relocated if and only if it could be
|
||||
* laundered or reclaimed by the page daemon.
|
||||
@ -4065,7 +4063,7 @@ vm_page_release(vm_page_t m, int flags)
|
||||
|
||||
if ((flags & VPR_TRYFREE) != 0) {
|
||||
for (;;) {
|
||||
object = (vm_object_t)atomic_load_ptr(&m->object);
|
||||
object = atomic_load_ptr(&m->object);
|
||||
if (object == NULL)
|
||||
break;
|
||||
/* Depends on type-stability. */
|
||||
|
@ -767,7 +767,7 @@ vm_pageout_launder(struct vm_domain *vmd, int launder, bool in_shortfall)
|
||||
if (object == NULL || object != m->object) {
|
||||
if (object != NULL)
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
object = (vm_object_t)atomic_load_ptr(&m->object);
|
||||
object = atomic_load_ptr(&m->object);
|
||||
if (__predict_false(object == NULL))
|
||||
/* The page is being freed by another thread. */
|
||||
continue;
|
||||
@ -1238,7 +1238,7 @@ vm_pageout_scan_active(struct vm_domain *vmd, int page_shortage)
|
||||
* A page's object pointer may be set to NULL before
|
||||
* the object lock is acquired.
|
||||
*/
|
||||
object = (vm_object_t)atomic_load_ptr(&m->object);
|
||||
object = atomic_load_ptr(&m->object);
|
||||
if (__predict_false(object == NULL))
|
||||
/*
|
||||
* The page has been removed from its object.
|
||||
@ -1481,7 +1481,7 @@ vm_pageout_scan_inactive(struct vm_domain *vmd, int shortage,
|
||||
if (object == NULL || object != m->object) {
|
||||
if (object != NULL)
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
object = (vm_object_t)atomic_load_ptr(&m->object);
|
||||
object = atomic_load_ptr(&m->object);
|
||||
if (__predict_false(object == NULL))
|
||||
/* The page is being freed by another thread. */
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user