diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-07-18 14:03:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:28:49 -0500 |
commit | 044ac6afa7a36b352f4cb203879af082d4726417 (patch) | |
tree | 8b045d8a5a5e8f768b964f80397fcbfa816c5370 /source/locking | |
parent | b52bb1e1556d2f4c2bfbd21e12782420bc26a029 (diff) | |
download | samba-044ac6afa7a36b352f4cb203879af082d4726417.tar.gz samba-044ac6afa7a36b352f4cb203879af082d4726417.tar.xz samba-044ac6afa7a36b352f4cb203879af082d4726417.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
Diffstat (limited to 'source/locking')
-rw-r--r-- | source/locking/locking.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c index 8692001f44e..e4d06b8bfda 100644 --- a/source/locking/locking.c +++ b/source/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); |