summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-07-18 14:03:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:49 -0500
commit070215ef131245eb386837c666c1884c2556a456 (patch)
tree6fe3f5138ef400145c485a4bb593ba18be3715b8
parentfa07beaf80ace4ab818ac596116b7cba8e49fd7c (diff)
downloadsamba-070215ef131245eb386837c666c1884c2556a456.tar.gz
samba-070215ef131245eb386837c666c1884c2556a456.tar.bz2
samba-070215ef131245eb386837c666c1884c2556a456.zip
r23956: merge from 3_2-ctdb-tridge:
fixed a bug with dead share mode entries jra: please tell me if it's ok to merge this to 3_2_0. metze (This used to be commit 044ac6afa7a36b352f4cb203879af082d4726417)
-rw-r--r--source3/locking/locking.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 8692001f44..e4d06b8bfd 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -937,6 +937,14 @@ BOOL is_valid_share_mode_entry(const struct share_mode_entry *e)
{
int num_props = 0;
+ if (e->op_type == UNUSED_SHARE_MODE_ENTRY) {
+ /* cope with dead entries from the process not
+ existing. These should not be considered valid,
+ otherwise we end up doing zero timeout sharing
+ violation */
+ return False;
+ }
+
num_props += ((e->op_type == NO_OPLOCK) ? 1 : 0);
num_props += (EXCLUSIVE_OPLOCK_TYPE(e->op_type) ? 1 : 0);
num_props += (LEVEL_II_OPLOCK_TYPE(e->op_type) ? 1 : 0);