summaryrefslogtreecommitdiffstats
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-12-17 17:23:13 -0800
committerJeremy Allison <jra@samba.org>2008-12-17 17:23:13 -0800
commit1a5fc6d4bc847d9896500b704c9a8d5ac7faa7d2 (patch)
tree3a6d51a6dc4794711a63e7447b020ffd6ec51a43 /source3/locking
parent43d0a4813bf919e7fe6ab82f6920015d1a57f7bc (diff)
downloadsamba-1a5fc6d4bc847d9896500b704c9a8d5ac7faa7d2.tar.gz
samba-1a5fc6d4bc847d9896500b704c9a8d5ac7faa7d2.tar.xz
samba-1a5fc6d4bc847d9896500b704c9a8d5ac7faa7d2.zip
Fix bug #5979 - Level 2 oplocks being granted improperly,
Jeremy.
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index a70f9d20fe..b342fa9b1e 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -1186,7 +1186,16 @@ bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
}
e->op_mid = 0;
- e->op_type = NO_OPLOCK;
+ if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
+ /*
+ * Going from exclusive or batch,
+ * we always go through FAKE_LEVEL_II
+ * first.
+ */
+ e->op_type = FAKE_LEVEL_II_OPLOCK;
+ } else {
+ e->op_type = NO_OPLOCK;
+ }
lck->modified = True;
return True;
}