smbd: Avoid calling remove_stale_share_mode_entries() in open.c
authorVolker Lendecke <vl@samba.org>
Mon, 26 Aug 2019 16:56:24 +0000 (18:56 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 17 Sep 2019 22:49:38 +0000 (22:49 +0000)
All places that matter explicitly check for staleness. This cleanup
action should only happen before writing the database

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

index 73fdaa09d59ebf1d149f60c643f590d68bb8d128..d9146f0582d0a5ab23312c652fdf1887b9e74b8d 100644 (file)
@@ -1897,8 +1897,6 @@ static bool validate_oplock_types(struct share_mode_lock *lck)
                return false;
        }
 
-       remove_stale_share_mode_entries(lck->data);
-
        if ((state.batch || state.ex_or_batch) &&
            (state.num_non_stat_opens != 1)) {
                DBG_WARNING("got batch (%d) or ex (%d) non-exclusively "