summaryrefslogtreecommitdiff
path: root/source3/locking/leases_util.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2022-08-18 12:52:54 +0200
committerJeremy Allison <jra@samba.org>2022-08-19 18:41:34 +0000
commit76da56aa65bb9fe7f2f8c4a2e30e278a61db1ff5 (patch)
tree6296dadb7dd5c0db14211f31f978c5f814cbd3c5 /source3/locking/leases_util.c
parentbf8f2258497f7d2a5a5f8d1cacf1a30899ed455c (diff)
downloadsamba-76da56aa65bb9fe7f2f8c4a2e30e278a61db1ff5.tar.gz
s3:smbd: inline fsp_lease_type_is_exclusive() logic into contend_level2_oplocks_begin_default
SMB2_LEASE_WRITE is the indication for an exclusive lease, the fact that a SMB2_LEASE_WRITE can't exists without SMB2_LEASE_READ is not important here. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking/leases_util.c')
-rw-r--r--source3/locking/leases_util.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/source3/locking/leases_util.c b/source3/locking/leases_util.c
index cb62bffbd7d..9ae4081cd7b 100644
--- a/source3/locking/leases_util.c
+++ b/source3/locking/leases_util.c
@@ -71,23 +71,6 @@ uint32_t fsp_lease_type(struct files_struct *fsp)
return fsp->lease_type;
}
-static uint32_t lease_type_is_exclusive(uint32_t lease_type)
-{
- if ((lease_type & (SMB2_LEASE_READ | SMB2_LEASE_WRITE)) ==
- (SMB2_LEASE_READ | SMB2_LEASE_WRITE)) {
- return true;
- }
-
- return false;
-}
-
-bool fsp_lease_type_is_exclusive(struct files_struct *fsp)
-{
- uint32_t lease_type = fsp_lease_type(fsp);
-
- return lease_type_is_exclusive(lease_type);
-}
-
const struct GUID *fsp_client_guid(const files_struct *fsp)
{
return &fsp->conn->sconn->client->global->client_guid;