Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_prot.c
Show First 20 Lines • Show All 1,949 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
void | void | ||||
credbatch_add(struct credbatch *crb, struct thread *td) | credbatch_add(struct credbatch *crb, struct thread *td) | ||||
{ | { | ||||
struct ucred *cr; | struct ucred *cr; | ||||
MPASS(td->td_realucred != NULL); | MPASS(td->td_realucred != NULL); | ||||
MPASS(td->td_realucred == td->td_ucred); | MPASS(td->td_realucred == td->td_ucred); | ||||
MPASS(td->td_state == TDS_INACTIVE); | MPASS(TD_GET_STATE(td) == TDS_INACTIVE); | ||||
cr = td->td_realucred; | cr = td->td_realucred; | ||||
KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p", | KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p", | ||||
__func__, cr->cr_users, cr)); | __func__, cr->cr_users, cr)); | ||||
if (crb->cred != cr) { | if (crb->cred != cr) { | ||||
if (crb->users > 0) { | if (crb->users > 0) { | ||||
MPASS(crb->cred != NULL); | MPASS(crb->cred != NULL); | ||||
crunusebatch(crb->cred, crb->users, crb->ref); | crunusebatch(crb->cred, crb->users, crb->ref); | ||||
crb->users = 0; | crb->users = 0; | ||||
▲ Show 20 Lines • Show All 521 Lines • Show Last 20 Lines |