smbd: Fix an assert
authorVolker Lendecke <vl@samba.org>
Wed, 20 Apr 2016 11:13:38 +0000 (13:13 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 2 Jun 2016 13:08:18 +0000 (15:08 +0200)
This might stumble over stale entries

Signed-off-by: Volker Lendecke <vl@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11844

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Thu Jun  2 15:08:18 CEST 2016 on sn-devel-104

source3/smbd/oplock.c

index f50d3b95b6b193507754967a24e7424ca90206cd..9996b8b3c6df901d98af896fe3dc436e52561ef6 100644 (file)
@@ -190,6 +190,7 @@ bool update_num_read_oplocks(files_struct *fsp, struct share_mode_lock *lck)
                /*
                 * If we're the only one, we don't need a brlock entry
                 */
+               remove_stale_share_mode_entries(d);
                SMB_ASSERT(d->num_share_modes == 1);
                SMB_ASSERT(EXCLUSIVE_OPLOCK_TYPE(d->share_modes[0].op_type));
                return true;