diff options
author | kib <kib@FreeBSD.org> | 2014-08-29 09:02:01 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-29 09:02:01 +0000 |
commit | d7608dcfd61cd04f000829f02e61aafac80bed95 (patch) | |
tree | 51e2f28ee826c3fb4948b83b267223110e045482 /sys/kern/kern_lock.c | |
parent | 7804cefc6394c83b9c1464cfdb246c2560c4459a (diff) | |
download | FreeBSD-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.c | 8 |
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) { |