diff options
author | Jeremy Allison <jra@samba.org> | 2000-05-03 02:27:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-05-03 02:27:41 +0000 |
commit | 20ce61ccc88dd3868176932736e03e4d85f1bfd0 (patch) | |
tree | 037d1b145978eaccf3e1f55f6b006a31bd086bcd /source3/locking/brlock.c | |
parent | 37a6e44ad846598aedc8cb7306c1aef86d930756 (diff) | |
download | samba-20ce61ccc88dd3868176932736e03e4d85f1bfd0.tar.gz samba-20ce61ccc88dd3868176932736e03e4d85f1bfd0.tar.xz samba-20ce61ccc88dd3868176932736e03e4d85f1bfd0.zip |
Fix for stacking locks in brlock and POSIX. Windows only allows a read lock
to overlay a write lock on the same fnum. When overlaying read locks onto
a write lock, the number of locks is counted, and the first unlock removes
the write lock and downgrades this to a read lock. Do the same when mapping
to POSIX.
Jeremy.
(This used to be commit 74d42644e6e52808037975e909aa56c850838b76)
Diffstat (limited to 'source3/locking/brlock.c')
-rw-r--r-- | source3/locking/brlock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 0ded1846b4e..7e403bc9546 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -86,7 +86,7 @@ static BOOL brl_conflict(struct lock_struct *lck1, return False; if (brl_same_context(&lck1->context, &lck2->context) && - lck2->lock_type == READ_LOCK) return False; + lck2->lock_type == READ_LOCK && lck1->fnum == lck2->fnum) return False; if (lck1->start >= (lck2->start + lck2->size) || lck2->start >= (lck1->start + lck1->size)) return False; |