diff options
Diffstat (limited to 'sys/kern/kern_rangelock.c')
-rw-r--r-- | sys/kern/kern_rangelock.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 3a11059a7f64..3437e3da77ba 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -313,15 +313,8 @@ static struct rl_q_entry * rlqentry_alloc(vm_ooffset_t start, vm_ooffset_t end, int flags) { struct rl_q_entry *e; - struct thread *td; - - td = curthread; - if (td->td_rlqe != NULL) { - e = td->td_rlqe; - td->td_rlqe = NULL; - } else { - e = uma_zalloc_smr(rl_entry_zone, M_WAITOK); - } + + e = uma_zalloc_smr(rl_entry_zone, M_WAITOK); e->rl_q_next = NULL; e->rl_q_free = NULL; e->rl_q_start = start; @@ -334,12 +327,6 @@ rlqentry_alloc(vm_ooffset_t start, vm_ooffset_t end, int flags) } void -rangelock_entry_free(struct rl_q_entry *e) -{ - uma_zfree_smr(rl_entry_zone, e); -} - -void rangelock_init(struct rangelock *lock) { lock->sleepers = false; @@ -401,19 +388,12 @@ static void rangelock_free_free(struct rl_q_entry *free) { struct rl_q_entry *x, *xp; - struct thread *td; - td = curthread; for (x = free; x != NULL; x = xp) { MPASS(!rl_e_is_marked(x)); xp = x->rl_q_free; MPASS(!rl_e_is_marked(xp)); - if (td->td_rlqe == NULL) { - smr_synchronize(rl_smr); - td->td_rlqe = x; - } else { - uma_zfree_smr(rl_entry_zone, x); - } + uma_zfree_smr(rl_entry_zone, x); } } |