diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-11-24 03:49:37 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-11-24 03:49:37 +0000 |
commit | f90d57b808449f1bf8c6856a818174253d7e5e46 (patch) | |
tree | 9e3fd43bc70acf05e454ff91ca7f5a5d9c8ac358 /sys/kern/kern_lock.c | |
parent | 094c148b7a98d1b59ab2cf266cb841f71c590513 (diff) | |
download | src-f90d57b808449f1bf8c6856a818174253d7e5e46.tar.gz src-f90d57b808449f1bf8c6856a818174253d7e5e46.zip |
locks: push lock_delay_arg_init calls down
Minor cleanup to skip doing them when recursing on locks and so that
they can act on found lock value if need be.
Notes
Notes:
svn path=/head/; revision=367978
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 1490e0595714..98c6cafde702 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -603,10 +603,10 @@ lockmgr_slock_hard(struct lock *lk, u_int flags, struct lock_object *ilk, if (LK_CAN_WITNESS(flags)) WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER, file, line, flags & LK_INTERLOCK ? ilk : NULL); + x = lockmgr_read_value(lk); lock_delay_arg_init(&lda, &lockmgr_delay); if (!lk_adaptive) flags &= ~LK_ADAPTIVE; - x = lockmgr_read_value(lk); /* * The lock may already be locked exclusive by curthread, * avoid deadlock. |