]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/locking: add const to fsp_lease_type
authorRalph Boehme <slow@samba.org>
Thu, 4 May 2017 09:50:01 +0000 (11:50 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 9 May 2017 08:17:08 +0000 (10:17 +0200)
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>
(cherry picked from commit 952701dce09b1ee89a0f6a450ac244fd6451955b)

source3/locking/leases_util.c
source3/locking/proto.h

index cb307c88d36e99f8cf0e19ba8ed1bc49f0dc6c42..5d07ff9dd7bb5ffec07634f11e9cc50ab431b6ff 100644 (file)
@@ -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;
index 17cb1cdf86b4ef167231ce00500c6f4e2c38266e..31c496870219352a08ebfae48eb84234e1300646 100644 (file)
@@ -250,6 +250,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_ */