summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-08-05 14:59:18 +0200
committerJeremy Allison <jra@samba.org>2019-08-06 21:49:29 +0000
commite4d5c53e8083406552f361d2df27528d1c2ea061 (patch)
tree19f9a00e9d742df79c7677a624da81418240319f /source3/locking
parent3851062916cbee2114f6aa5154cdc89425724d87 (diff)
downloadsamba-e4d5c53e8083406552f361d2df27528d1c2ea061.tar.gz
smbd: Slightly simplify set_share_mode()
The fsp carries all required information also for leases. There's no need to pass that as additional parameters Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c7
-rw-r--r--source3/locking/proto.h4
2 files changed, 4 insertions, 7 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 45399b65f1f..5ef844c51c6 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -795,9 +795,7 @@ bool set_share_mode(struct share_mode_lock *lck,
uint64_t mid,
uint16_t op_type,
uint32_t share_access,
- uint32_t access_mask,
- const struct GUID *client_guid,
- const struct smb2_lease_key *lease_key)
+ uint32_t access_mask)
{
struct share_mode_data *d = lck->data;
struct share_mode_entry *tmp, *e;
@@ -821,8 +819,9 @@ bool set_share_mode(struct share_mode_lock *lck,
e->op_type = op_type;
if (op_type == LEASE_OPLOCK) {
+ const struct GUID *client_guid = fsp_client_guid(fsp);
e->client_guid = *client_guid;
- e->lease_key = *lease_key;
+ e->lease_key = fsp->lease->lease.lease_key;
}
e->time.tv_sec = fsp->open_time.tv_sec;
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index 57619b81866..37f36870751 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -161,9 +161,7 @@ bool set_share_mode(struct share_mode_lock *lck,
uint64_t mid,
uint16_t op_type,
uint32_t share_access,
- uint32_t access_mask,
- const struct GUID *client_guid,
- const struct smb2_lease_key *lease_key);
+ uint32_t access_mask);
void remove_stale_share_mode_entries(struct share_mode_data *d);
bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
bool mark_share_mode_disconnected(struct share_mode_lock *lck,