diff options
author | jhb <jhb@FreeBSD.org> | 2002-05-20 19:16:22 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-05-20 19:16:22 +0000 |
commit | a4a680304c98d93eef7fb38ab24eea03cd91b3ec (patch) | |
tree | 13a52e12b82883226618914640df210af6ba431e | |
parent | d62a129a258c427cbe154877b0cb9a396551a605 (diff) | |
download | FreeBSD-src-a4a680304c98d93eef7fb38ab24eea03cd91b3ec.zip FreeBSD-src-a4a680304c98d93eef7fb38ab24eea03cd91b3ec.tar.gz |
In witness_unlock(), when updating a lock list entry bucket, decrement the
count of lock list entries after we fixup the bucket of lock list entries.
In theory we can remove the intr_disable/intr_restore() calls now.
-rw-r--r-- | sys/kern/subr_witness.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 099828d..394d1a7 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -848,10 +848,10 @@ witness_unlock(struct lock_object *lock, int flags, const char *file, int line) td->td_proc->p_pid, instance->li_lock->lo_name, (*lock_list)->ll_count - 1); - (*lock_list)->ll_count--; - for (j = i; j < (*lock_list)->ll_count; j++) + for (j = i; j < (*lock_list)->ll_count - 1; j++) (*lock_list)->ll_children[j] = (*lock_list)->ll_children[j + 1]; + (*lock_list)->ll_count--; intr_restore(s); if ((*lock_list)->ll_count == 0) { lle = *lock_list; |