smbd: Fix an assert
authorVolker Lendecke <vl@samba.org>
Wed, 20 Apr 2016 11:13:38 +0000 (13:13 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 16 May 2016 17:52:21 +0000 (19:52 +0200)
This might stumble over stale entries

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11844
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/oplock.c

index 4f108d9545e6da750b39427cf974dfa42929f06c..4ce3a1d656999557de78fb5ae579d56282c21920 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;