lockmgr: retire the unused lockmgr_unlock_fast_path routine

This commit is contained in:
mjg 2020-02-14 11:20:25 +00:00
parent 91b857e0c5
commit db03003995
2 changed files with 0 additions and 42 deletions

View File

@ -1114,46 +1114,6 @@ out:
return (0);
}
int
lockmgr_unlock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk)
{
struct lock_class *class;
uintptr_t x, tid;
const char *file;
int line;
if (KERNEL_PANICKED())
return (0);
file = __FILE__;
line = __LINE__;
_lockmgr_assert(lk, KA_LOCKED, file, line);
x = lk->lk_lock;
if (__predict_true(x & LK_SHARE) != 0) {
lockmgr_note_shared_release(lk, file, line);
if (lockmgr_sunlock_try(lk, &x)) {
LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_READER);
} else {
return (lockmgr_sunlock_hard(lk, x, flags, ilk, file, line));
}
} else {
tid = (uintptr_t)curthread;
lockmgr_note_exclusive_release(lk, file, line);
if (!lockmgr_recursed(lk) &&
atomic_cmpset_rel_ptr(&lk->lk_lock, tid, LK_UNLOCKED)) {
LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_WRITER);
} else {
return (lockmgr_xunlock_hard(lk, x, flags, ilk, file, line));
}
}
if (__predict_false(flags & LK_INTERLOCK)) {
class = LOCK_CLASS(ilk);
class->lc_unlock(ilk);
}
return (0);
}
/*
* Lightweight entry points for common operations.
*

View File

@ -72,8 +72,6 @@ int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
const char *wmesg, int prio, int timo, const char *file, int line);
int lockmgr_lock_fast_path(struct lock *lk, u_int flags,
struct lock_object *ilk, const char *file, int line);
int lockmgr_unlock_fast_path(struct lock *lk, u_int flags,
struct lock_object *ilk);
int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line);
int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line);
int lockmgr_unlock(struct lock *lk);