Whenever using SMB *with* another file sharing protocol.
The opportunistic lock (oplock) function allows an application to open a file that might be used by multiple applications, as though it was the only application using the file if the application makes the first open request.
When a second application requests access to a file with an outstanding oplock, the initial application having the existing oplock is notified by the server. The prior application, if acting politely, will then flush it’s buffers and write any file changes to the server. After writing the changes the first application typically issues a lock for only the range of bytes it needs to use, releasing the overall lock of the file.