r14602: Fix another logic bug in new oplock handling. Just
authorJeremy Allison <jra@samba.org>
Tue, 21 Mar 2006 06:53:49 +0000 (06:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:39 +0000 (11:15 -0500)
commit5067cca077ab8dde110f79ea9e60611dc25ddf64
treec105e7aa1400abfb67c3773f0047c34971a20758
parent97ee5b1afa342eea40f973f5370c9f620c63bd01
r14602: Fix another logic bug in new oplock handling. Just
because lck->num_share_modes != 0 doesn't mean that
there *are* other valid share modes. They may be
all marked "UNUSED" or be deferred open entries.
In that case don't downgrade the granted oplock to
level2 needlessly - a client can have an exclusive
oplock in this case. The original code handled this
correctly in the lck->num_share_modes == 0 case but
not in the case where there were no valid share modes
but lck->num_share_modes != 0. I'll clean up my
Samba4 torture tester for this and commit it tomorrow.
Jeremy.
(This used to be commit 306061c93d9181262298516fefd83444f5a65ce5)
source3/smbd/open.c