device_pager.c (0bfd163f522701b486e066fa2e56624c02f5081a) | device_pager.c (8add0ced70e65b47e9c392a781678bdff553200b) |
---|---|
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. --- 155 unchanged lines hidden (view full) --- 164 mtx_lock(&dev_pager_mtx); 165 object = vm_pager_object_lookup(&dev_pager_object_list, handle); 166 if (object != NULL) { 167 /* 168 * We raced with other thread while allocating object. 169 */ 170 if (pindex > object->size) 171 object->size = pindex; | 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. --- 155 unchanged lines hidden (view full) --- 164 mtx_lock(&dev_pager_mtx); 165 object = vm_pager_object_lookup(&dev_pager_object_list, handle); 166 if (object != NULL) { 167 /* 168 * We raced with other thread while allocating object. 169 */ 170 if (pindex > object->size) 171 object->size = pindex; |
172 KASSERT(object->type == tp, 173 ("Inconsistent device pager type %p %d", object, tp)); |
|
172 } else { 173 object = object1; 174 object1 = NULL; 175 object->handle = handle; 176 TAILQ_INSERT_TAIL(&dev_pager_object_list, object, 177 pager_object_list); | 174 } else { 175 object = object1; 176 object1 = NULL; 177 object->handle = handle; 178 TAILQ_INSERT_TAIL(&dev_pager_object_list, object, 179 pager_object_list); |
178 KASSERT(object->type == tp, 179 ("Inconsistent device pager type %p %d", object, tp)); | |
180 } 181 } else { 182 if (pindex > object->size) 183 object->size = pindex; | 180 } 181 } else { 182 if (pindex > object->size) 183 object->size = pindex; |
184 KASSERT(object->type == tp, 185 ("Inconsistent device pager type %p %d", object, tp)); |
|
184 } 185 mtx_unlock(&dev_pager_mtx); 186 if (object1 != NULL) { 187 object1->handle = object1; 188 mtx_lock(&dev_pager_mtx); 189 TAILQ_INSERT_TAIL(&dev_pager_object_list, object1, 190 pager_object_list); 191 mtx_unlock(&dev_pager_mtx); --- 242 unchanged lines hidden --- | 186 } 187 mtx_unlock(&dev_pager_mtx); 188 if (object1 != NULL) { 189 object1->handle = object1; 190 mtx_lock(&dev_pager_mtx); 191 TAILQ_INSERT_TAIL(&dev_pager_object_list, object1, 192 pager_object_list); 193 mtx_unlock(&dev_pager_mtx); --- 242 unchanged lines hidden --- |