The only difference between batch and exclusive oplocks is the time of
the check: Batch is checked before the share mode check, exclusive after.
Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #9150 - Valid open requests can cause smbd assert due to incorrect
oplock handling on delete requests.
(cherry picked from commit
b20ca77e2a9d111eb2e77d0b804fe7505b07e418)
-static bool is_delete_request(files_struct *fsp) {
- return ((fsp->access_mask == DELETE_ACCESS) &&
- (fsp->oplock_type == NO_OPLOCK));
-}
-
/*
* Send a break message to the oplock holder and delay the open for
* our client.
/*
* Send a break message to the oplock holder and delay the open for
* our client.
}
if (exclusive != NULL) { /* Found an exclusive oplock */
}
if (exclusive != NULL) { /* Found an exclusive oplock */
- bool delay_it = is_delete_request(fsp) ?
- BATCH_OPLOCK_TYPE(exclusive->op_type) : true;
SMB_ASSERT(!have_level2);
SMB_ASSERT(!have_level2);
- if (delay_it) {
- send_break_message(fsp, exclusive, mid, oplock_request);
- return true;
- }
+ send_break_message(fsp, exclusive, mid, oplock_request);
+ return true;