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>
return NT_STATUS_OK;
}
-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.
int oplock_request,
struct share_mode_entry *ex_entry)
{
- bool delay_it;
-
if ((oplock_request & INTERNAL_OPEN_ONLY) || is_stat_open(fsp->access_mask)) {
return false;
}
return false;
}
- /* Found an exclusive or batch oplock */
-
- delay_it = is_delete_request(fsp) ?
- BATCH_OPLOCK_TYPE(ex_entry->op_type) : true;
-
- if (!delay_it) {
- return false;
- }
-
send_break_message(fsp, ex_entry, mid, oplock_request);
return true;
}