aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2014-08-29 09:02:01 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2014-08-29 09:02:01 +0000
commit575e02d94fc1d5aa2c4da397fe8fed74bd6025c1 (patch)
tree51e2f28ee826c3fb4948b83b267223110e045482 /sys/kern/kern_lock.c
parentba572d1a95fd7c40404a22a7537cdc2e8666fdeb (diff)
downloadsrc-575e02d94fc1d5aa2c4da397fe8fed74bd6025c1.tar.gz
src-575e02d94fc1d5aa2c4da397fe8fed74bd6025c1.zip
Add function and wrapper to switch lockmgr and vnode lock back to
auto-promotion of shared to exclusive. Tested by: hrs, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
Notes
Notes: svn path=/head/; revision=270795
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 5b6910656746..965033a2baf2 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -418,6 +418,14 @@ lockallowshare(struct lock *lk)
}
void
+lockdisableshare(struct lock *lk)
+{
+
+ lockmgr_assert(lk, KA_XLOCKED);
+ lk->lock_object.lo_flags |= LK_NOSHARE;
+}
+
+void
lockallowrecurse(struct lock *lk)
{