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)
commit306061c93d9181262298516fefd83444f5a65ce5
tree3db8fcbd18b229c9b387d46410986356eb7264f1
parent763f4c01488a96aec000c18bca313da37ed1df1b
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.
source/smbd/open.c