From 070215ef131245eb386837c666c1884c2556a456 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Jul 2007 14:03:46 +0000 Subject: 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) --- source3/locking/locking.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- cgit