smbd: Don't store num_read_oplocks in brlock.tdb
authorVolker Lendecke <vl@samba.org>
Sun, 30 Jun 2019 17:51:13 +0000 (19:51 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 4 Jul 2019 14:03:29 +0000 (14:03 +0000)
commit8bae5d82e2a101d37f5572e1d174b37816576840
treed7be69f5f1dd2cff49fc67eb8f409f817a9b061a
parent2d7efba0d9dd212df127ffd697ff72fb30b72861
smbd: Don't store num_read_oplocks in brlock.tdb

This removes a kludgy implementation that worked around a locking
hierarchy problem: Setting a byte range lock had to contend the level2
oplocks, which are stored in locking.tdb/leases.tdb. We could not
access locking.tdb in the brlock.tdb code, as brlock.tdb might have
been locked first without locking.tdb, violating the locking hierarchy
locking.tdb->brlock.tdb. Now that that problem is gone (see the commit
wrapping do_lock() in share_mode_do_locked()), we can remove this
kludge.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/locking/brlock.c
source3/locking/proto.h
source3/smbd/open.c
source3/smbd/oplock.c
source3/smbd/proto.h