- /*
- * Deal with a race condition when breaking level2
- * oplocks. Don't send all the messages and release
- * the lock, this allows someone else to come in and
- * get a level2 lock before any of the messages are
- * processed, and thus miss getting a break message.
- * Ensure at least one entry (the one we're breaking)
- * is processed immediately under the lock and becomes
- * set as NO_OPLOCK to stop any waiter getting a level2.
- * Bugid #5980.
- */
-
- if (serverid_equal(&self, &share_entry->pid)) {
- struct files_struct *cur_fsp =
- initial_break_processing(state->sconn,
- share_entry->id,
- share_entry->share_file_id);
- if (cur_fsp != NULL) {
- wait_before_sending_break();
- break_level2_to_none_async(cur_fsp);
- } else {
- DEBUG(3, ("release_level_2_oplocks_on_change: "
- "Did not find fsp, ignoring\n"));
- }
- } else {
- messaging_send_buf(state->sconn->msg_ctx,
- share_entry->pid,
- MSG_SMB_ASYNC_LEVEL2_BREAK,
- (uint8 *)msg, sizeof(msg));
- }
+ messaging_send_buf(state->sconn->msg_ctx, share_entry->pid,
+ MSG_SMB_ASYNC_LEVEL2_BREAK,
+ (uint8 *)msg, sizeof(msg));