smbd: Remove stale share mode entries while walking the array
authorVolker Lendecke <vl@samba.org>
Mon, 2 Sep 2019 14:25:28 +0000 (16:25 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 17 Sep 2019 22:49:39 +0000 (22:49 +0000)
commit87e42c73d379738a5f87569ea630c28c9d66c148
treef384ed3b9f19f0b818aa94998288bfbc87325cf3
parentf96aa7063e846021b69403cc9caa091c8e09b578
smbd: Remove stale share mode entries while walking the array

Previously, we did this only when writing out the locking.tdb
record. That was because we had places where the index of a particular
share mode entry mattered while operating on the array. This is no
longer the case, so we can remove stale entries early.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/locking.c
source3/locking/share_mode_lock.c