summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-05-04 11:50:01 +0200
committerRalph Boehme <slow@samba.org>2017-05-06 19:01:14 +0200
commit952701dce09b1ee89a0f6a450ac244fd6451955b (patch)
tree09969b1afdc591c71c5b28d9d14c6e09cc766cdd /source3/locking
parent9703464b942fdddbf7bc4380cbd26d1803f9bc00 (diff)
downloadsamba-952701dce09b1ee89a0f6a450ac244fd6451955b.tar.gz
s3/locking: add const to fsp_lease_type
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12766 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/leases_util.c2
-rw-r--r--source3/locking/proto.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/locking/leases_util.c b/source3/locking/leases_util.c
index cb307c88d36..5d07ff9dd7b 100644
--- a/source3/locking/leases_util.c
+++ b/source3/locking/leases_util.c
@@ -46,7 +46,7 @@ uint32_t map_oplock_to_lease_type(uint16_t op_type)
return ret;
}
-uint32_t fsp_lease_type(struct files_struct *fsp)
+uint32_t fsp_lease_type(const struct files_struct *fsp)
{
if (fsp->oplock_type == LEASE_OPLOCK) {
return fsp->lease->lease.lease_state;
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index 967af02bb26..44ab315660b 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -257,6 +257,6 @@ bool release_posix_lock_posix_flavour(files_struct *fsp,
/* The following definitions come from locking/leases_util.c */
uint32_t map_oplock_to_lease_type(uint16_t op_type);
-uint32_t fsp_lease_type(struct files_struct *fsp);
+uint32_t fsp_lease_type(const struct files_struct *fsp);
#endif /* _LOCKING_PROTO_H_ */