diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2014-08-29 09:02:01 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2014-08-29 09:02:01 +0000 |
commit | 575e02d94fc1d5aa2c4da397fe8fed74bd6025c1 (patch) | |
tree | 51e2f28ee826c3fb4948b83b267223110e045482 /sys/kern | |
parent | ba572d1a95fd7c40404a22a7537cdc2e8666fdeb (diff) | |
download | src-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')
-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 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) { |