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
d23850207b
commit
a2de789ebb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362890
@ -1985,7 +1985,7 @@ crfree(struct ucred *cr)
|
|||||||
struct thread *td;
|
struct thread *td;
|
||||||
|
|
||||||
td = curthread;
|
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",
|
KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p",
|
||||||
__func__, cr->cr_users, cr));
|
__func__, cr->cr_users, cr));
|
||||||
td->td_ucredref--;
|
td->td_ucredref--;
|
||||||
|
Loading…
Reference in New Issue
Block a user