diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index a988d0e3ea88..ad52af0bd862 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -170,8 +170,7 @@ sx_init_flags(struct sx *sx, const char *description, int opts) { int flags; - flags = LO_SLEEPABLE | LO_UPGRADABLE | LO_RECURSABLE;; - + flags = LO_SLEEPABLE | LO_UPGRADABLE | LO_RECURSABLE; if (opts & SX_DUPOK) flags |= LO_DUPOK; if (opts & SX_NOPROFILE) @@ -274,6 +273,8 @@ _sx_sunlock(struct sx *sx, const char *file, int line) curthread->td_locks--; WITNESS_UNLOCK(&sx->lock_object, 0, file, line); LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); + if (SX_SHARERS(x) == 0) + lock_profile_release_lock(&sx->lock_object); __sx_sunlock(sx, file, line); } @@ -522,9 +523,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t tid, const char *file, int line) __func__, sx); } - GIANT_RESTORE(); + GIANT_RESTORE(); lock_profile_obtain_lock_success(&(sx)->lock_object, contested, - waitstart, (file), (line)); + waitstart, file, line); } /* |