Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
struct share_mode_data *d = lck->data;
struct open_mode_check_state state;
uint16_t new_flags;
- bool ok, conflict;
+ bool ok, conflict, have_share_entries;
if (is_stat_open(access_mask)) {
/* Stat open that doesn't trigger oplock breaks or share mode
}
#endif
- if (d->num_share_modes == 0) {
+ have_share_entries = share_mode_have_entries(lck);
+ if (!have_share_entries) {
+ /*
+ * This is a fresh share mode lock where no conflicts
+ * can happen.
+ */
return NT_STATUS_OK;
}