vm_pager.h (f29ba63ec91fe9ed9f731e690254bba1d38f0b78) vm_pager.h (f566a0b6baa2ac4f8539f7a9a10b61edcbd00ea7)
1/*
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

--- 105 unchanged lines hidden (view full) ---

114 */
115static __inline int
116vm_pager_get_pages(
117 vm_object_t object,
118 vm_page_t *m,
119 int count,
120 int reqpage
121) {
1/*
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

--- 105 unchanged lines hidden (view full) ---

114 */
115static __inline int
116vm_pager_get_pages(
117 vm_object_t object,
118 vm_page_t *m,
119 int count,
120 int reqpage
121) {
122 int is_object_locked;
123 int r;
124
122 int r;
123
125 if (!(is_object_locked = VM_OBJECT_LOCKED(object)))
126 VM_OBJECT_LOCK(object);
124 VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
127 r = (*pagertab[object->type]->pgo_getpages)(object, m, count, reqpage);
128 if (r == VM_PAGER_OK && m[reqpage]->valid != VM_PAGE_BITS_ALL) {
129 vm_page_zero_invalid(m[reqpage], TRUE);
130 }
125 r = (*pagertab[object->type]->pgo_getpages)(object, m, count, reqpage);
126 if (r == VM_PAGER_OK && m[reqpage]->valid != VM_PAGE_BITS_ALL) {
127 vm_page_zero_invalid(m[reqpage], TRUE);
128 }
131 if (!is_object_locked)
132 VM_OBJECT_UNLOCK(object);
133 return (r);
134}
135
136static __inline void
137vm_pager_put_pages(
138 vm_object_t object,
139 vm_page_t *m,
140 int count,

--- 50 unchanged lines hidden ---
129 return (r);
130}
131
132static __inline void
133vm_pager_put_pages(
134 vm_object_t object,
135 vm_page_t *m,
136 int count,

--- 50 unchanged lines hidden ---