return;
}
- fsp_lease_update(lck, fsp_client_guid(fsp), fsp->lease);
+ fsp_lease_update(fsp);
if (lease->lease.lease_epoch != old_epoch) {
/*
TALLOC_FREE(lck);
}
-bool fsp_lease_update(struct share_mode_lock *lck,
- const struct GUID *client_guid,
- struct fsp_lease *lease)
+bool fsp_lease_update(struct files_struct *fsp)
{
+ const struct GUID *client_guid = fsp_client_guid(fsp);
+ struct fsp_lease *lease = fsp->lease;
uint32_t current_state;
bool breaking;
uint16_t lease_version, epoch;
NTSTATUS status;
status = leases_db_get(client_guid,
- &lease->lease.lease_key,
- &lck->data->id,
+ &fsp->lease->lease.lease_key,
+ &fsp->file_id,
¤t_state,
&breaking,
NULL, /* breaking_to_requested */
return NULL;
}
- fsp_lease_update(state->lck, fsp_client_guid(fsp), fsp->lease);
+ fsp_lease_update(fsp);
return NULL;
}
}
/* Ensure we're in sync with current lease state. */
- fsp_lease_update(lck, fsp_client_guid(fsp), fsp->lease);
+ fsp_lease_update(fsp);
TALLOC_FREE(lck);
}
bool remove_oplock_under_lock(files_struct *fsp, struct share_mode_lock *lck);
bool remove_oplock(files_struct *fsp);
bool downgrade_oplock(files_struct *fsp);
-bool fsp_lease_update(struct share_mode_lock *lck,
- const struct GUID *client_guid,
- struct fsp_lease *lease);
+bool fsp_lease_update(struct files_struct *fsp);
NTSTATUS downgrade_lease(struct smbXsrv_connection *xconn,
uint32_t num_file_ids,
const struct file_id *ids,