summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-04-15 16:30:17 -0700
committerJeremy Allison <jra@samba.org>2011-04-16 02:15:38 +0200
commit82fdad8a4c1e45d171a75b133eff8f9768edd682 (patch)
tree321327a47fee914e10cf8398965e26a11fe49237
parente49893c68ef29f71ac6301f3955a7404e9c6daba (diff)
downloadsamba-82fdad8a4c1e45d171a75b133eff8f9768edd682.tar.gz
samba-82fdad8a4c1e45d171a75b133eff8f9768edd682.tar.bz2
samba-82fdad8a4c1e45d171a75b133eff8f9768edd682.zip
Trying to track down the SMB2 error. Add an invariant test.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Apr 16 02:15:38 CEST 2011 on sn-devel-104
-rw-r--r--source3/locking/locking.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 28f1aceb49..f5892ddf0d 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -1376,12 +1376,15 @@ bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
return False;
}
- if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
+ if (EXCLUSIVE_OPLOCK_TYPE(e->op_type)) {
/*
* Going from exclusive or batch,
* we always go through FAKE_LEVEL_II
* first.
*/
+ if (!EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
+ smb_panic("remove_share_oplock: logic error");
+ }
e->op_type = FAKE_LEVEL_II_OPLOCK;
} else {
e->op_type = NO_OPLOCK;