Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
bool remove_oplock(files_struct *fsp);
bool downgrade_oplock(files_struct *fsp);
bool fsp_lease_update(struct files_struct *fsp);
+const struct smb2_lease *fsp_get_smb2_lease(const struct files_struct *fsp);
NTSTATUS downgrade_lease(struct smbXsrv_client *client,
uint32_t num_file_ids,
const struct file_id *ids,
tevent_req_received(req);
return NT_STATUS_OK;
}
+
+const struct smb2_lease *fsp_get_smb2_lease(const struct files_struct *fsp)
+{
+ if (fsp == NULL) {
+ return NULL;
+ }
+ if (fsp->lease == NULL) {
+ return NULL;
+ }
+ return &fsp->lease->lease;
+}