Lines Matching refs:uip
101 static void ubc_cs_free(struct ubc_info *uip);
373 register struct ubc_info *uip;
379 uip = vp->v_ubcinfo;
385 if (uip == UBC_INFO_NULL) {
387 uip = (struct ubc_info *) zalloc(ubc_info_zone);
388 bzero((char *)uip, sizeof(struct ubc_info));
390 uip->ui_vnode = vp;
391 uip->ui_flags = UI_INITED;
392 uip->ui_ucred = NOCRED;
394 assert(uip->ui_flags != UI_NONE);
395 assert(uip->ui_vnode == vp);
398 vp->v_ubcinfo = uip;
407 pager = (void *)vnode_pager_setup(vp, uip->ui_pager);
414 SET(uip->ui_flags, UI_HASPAGER);
415 uip->ui_pager = pager;
434 (memory_object_size_t)uip->ui_size, &control);
440 uip->ui_control = control; /* cache the value of the mo control */
441 SET(uip->ui_flags, UI_HASOBJREF); /* with a named reference */
445 error = vnode_size(vp, &uip->ui_size, vfs_context_current());
447 uip->ui_size = 0;
449 uip->ui_size = filesize;
462 * Parameters: uip A pointer to the ubc_info to free
474 ubc_info_free(struct ubc_info *uip)
476 if (IS_VALID_CRED(uip->ui_ucred)) {
477 kauth_cred_unref(&uip->ui_ucred);
480 if (uip->ui_control != MEMORY_OBJECT_CONTROL_NULL)
481 memory_object_control_deallocate(uip->ui_control);
483 cluster_release(uip);
484 ubc_cs_free(uip);
486 zfree(ubc_info_zone, uip);
492 ubc_info_deallocate(struct ubc_info *uip)
494 ubc_info_free(uip);
533 struct ubc_info *uip;
543 uip = vp->v_ubcinfo;
544 osize = uip->ui_size;
548 uip->ui_size = nsize;
561 control = uip->ui_control;
768 struct ubc_info *uip;
777 uip = vp->v_ubcinfo;
778 credp = uip->ui_ucred;
783 uip->ui_ucred = kauth_cred_proc_ref(p);
785 uip->ui_ucred = uthread->uu_ucred;
786 kauth_cred_ref(uip->ui_ucred);
825 struct ubc_info *uip;
837 uip = vp->v_ubcinfo;
838 credp = uip->ui_ucred;
840 uip->ui_ucred = kauth_cred_proc_ref(p);
1276 struct ubc_info *uip;
1284 uip = vp->v_ubcinfo;
1286 while (ISSET(uip->ui_flags, UI_MAPBUSY)) {
1287 SET(uip->ui_flags, UI_MAPWAITING);
1288 (void) msleep(&uip->ui_flags, &vp->v_lock,
1291 SET(uip->ui_flags, UI_MAPBUSY);
1302 if ( !ISSET(uip->ui_flags, UI_ISMAPPED))
1304 SET(uip->ui_flags, (UI_WASMAPPED | UI_ISMAPPED));
1306 CLR(uip->ui_flags, UI_MAPBUSY);
1308 if (ISSET(uip->ui_flags, UI_MAPWAITING)) {
1309 CLR(uip->ui_flags, UI_MAPWAITING);
1315 wakeup(&uip->ui_flags);
1352 struct ubc_info *uip;
1356 uip = vp->v_ubcinfo;
1470 struct ubc_info *uip;
1479 uip = vp->v_ubcinfo;
1481 while (ISSET(uip->ui_flags, UI_MAPBUSY)) {
1482 SET(uip->ui_flags, UI_MAPWAITING);
1483 (void) msleep(&uip->ui_flags, &vp->v_lock,
1486 SET(uip->ui_flags, UI_MAPBUSY);
1488 if (ISSET(uip->ui_flags, UI_ISMAPPED)) {
1489 CLR(uip->ui_flags, UI_ISMAPPED);
1501 CLR(uip->ui_flags, UI_MAPBUSY);
1502 if (ISSET(uip->ui_flags, UI_MAPWAITING)) {
1503 CLR(uip->ui_flags, UI_MAPWAITING);
1509 wakeup(&uip->ui_flags);
2173 struct ubc_info *uip;
2280 uip = vp->v_ubcinfo;
2283 for (oblob = uip->cs_blobs;
2336 kr = memory_object_signed(uip->ui_control, TRUE);
2350 blob->csb_next = uip->cs_blobs;
2351 uip->cs_blobs = blob;
2420 struct ubc_info *uip;
2431 uip = vp->v_ubcinfo;
2432 for (blob = uip->cs_blobs;
2456 struct ubc_info *uip)
2460 for (blob = uip->cs_blobs;
2477 uip->cs_blobs = NULL;
2484 struct ubc_info *uip;
2494 uip = vp->v_ubcinfo;
2495 blobs = uip->cs_blobs;