cred: add a prediction to crfree for td->td_realucred == cr
This matches crhold and eliminates an assembly maze in the common case.
This commit is contained in:
parent
1e1fa4c881
commit
802c8851a5
@ -1985,7 +1985,7 @@ crfree(struct ucred *cr)
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
if (td->td_realucred == cr) {
|
||||
if (__predict_true(td->td_realucred == cr)) {
|
||||
KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p",
|
||||
__func__, cr->cr_users, cr));
|
||||
td->td_ucredref--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user