static NTSTATUS grant_fsp_lease(struct files_struct *fsp,
struct share_mode_lock *lck,
const struct smb2_lease *lease,
- uint32_t *p_lease_idx,
uint32_t granted)
{
struct share_mode_data *d = lck->data;
return NT_STATUS_NO_MEMORY;
}
- *p_lease_idx = idx;
-
/*
* Upgrade only if the requested lease is a strict upgrade.
*/
fsp->lease->lease.lease_state = granted;
fsp->lease->lease.lease_epoch = lease->lease_epoch + 1;
- *p_lease_idx = d->num_leases;
-
d->leases[d->num_leases] = (struct share_mode_lease) {
.client_guid = *client_guid,
.lease_key = fsp->lease->lease.lease_key,
bool got_oplock = false;
uint32_t i;
uint32_t granted;
- uint32_t lease_idx = UINT32_MAX;
const struct GUID *client_guid = NULL;
const struct smb2_lease_key *lease_key = NULL;
bool ok;
fsp->oplock_type = LEASE_OPLOCK;
- status = grant_fsp_lease(fsp, lck, lease, &lease_idx,
- granted);
+ status = grant_fsp_lease(fsp, lck, lease, granted);
if (!NT_STATUS_IS_OK(status)) {
return status;