In Linux, Windows networking is serviced by the Samba daemon.
Samba is configured in one file: /etc/smb.conf.
The opportunistic locking settings can be set in the global section.
Add or replace these settings if they does not exists (these are the wanted settings):
[global]
kernel oplocks = yes
[mydatashare]
veto oplock files = /*.*/
strict locking = yes
oplocks = no
The mydatashare section is your share section as already set up in smb.conf.