&e->lease_key);
}
-static bool delay_for_oplock(files_struct *fsp,
- int oplock_request,
- const struct smb2_lease *lease,
- struct share_mode_lock *lck,
- bool have_sharing_violation,
- uint32_t create_disposition,
- bool first_open_attempt)
+static NTSTATUS delay_for_oplock(files_struct *fsp,
+ int oplock_request,
+ const struct smb2_lease *lease,
+ struct share_mode_lock *lck,
+ bool have_sharing_violation,
+ uint32_t create_disposition,
+ bool first_open_attempt)
{
struct share_mode_data *d = lck->data;
uint32_t i;
SMB2_LEASE_HANDLE : SMB2_LEASE_WRITE;
if (is_stat_open(fsp->access_mask)) {
- return false;
+ return NT_STATUS_OK;
}
switch (create_disposition) {
}
}
- return delay;
+ if (delay) {
+ return NT_STATUS_RETRY;
+ }
+ return NT_STATUS_OK;
}
static bool file_has_brlocks(files_struct *fsp)
bool first_open_attempt)
{
bool sharing_violation = false;
- bool delay = false;
NTSTATUS status;
status = open_mode_check(
return NT_STATUS_OK;
}
- delay = delay_for_oplock(
+ status = delay_for_oplock(
fsp,
oplock_request,
lease,
sharing_violation,
create_disposition,
first_open_attempt);
- if (delay) {
- return NT_STATUS_RETRY;
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
if (sharing_violation) {