summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-08-29 09:02:01 +0000
committerkib <kib@FreeBSD.org>2014-08-29 09:02:01 +0000
commitd7608dcfd61cd04f000829f02e61aafac80bed95 (patch)
tree51e2f28ee826c3fb4948b83b267223110e045482 /sys/kern/kern_lock.c
parent7804cefc6394c83b9c1464cfdb246c2560c4459a (diff)
downloadFreeBSD-src-d7608dcfd61cd04f000829f02e61aafac80bed95.zip
FreeBSD-src-d7608dcfd61cd04f000829f02e61aafac80bed95.tar.gz
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
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 5b69106..965033a 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)
{
OpenPOWER on IntegriCloud