diff options
author | Volker Lendecke <vl@samba.org> | 2019-08-10 15:01:00 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-08-19 23:14:38 +0000 |
commit | 021e2d01e68714556bd811ff2bc2a04c71a6c1fd (patch) | |
tree | 5098c7cef22899c96e1a75bfa9bd524a45a883ec | |
parent | 71c9fd73d42e092cf65de25fb7773fc1395ff601 (diff) | |
download | samba-021e2d01e68714556bd811ff2bc2a04c71a6c1fd.tar.gz |
smbd: Move is_same_lease() up in the file
The next commit will need it there
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
-rw-r--r-- | source3/smbd/open.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d889faedb44..262143fcdab 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1829,6 +1829,23 @@ static bool validate_oplock_types(struct share_mode_lock *lck) return true; } +static bool is_same_lease(const files_struct *fsp, + const struct share_mode_entry *e, + const struct smb2_lease *lease) +{ + if (e->op_type != LEASE_OPLOCK) { + return false; + } + if (lease == NULL) { + return false; + } + + return smb2_lease_equal(fsp_client_guid(fsp), + &lease->lease_key, + &e->client_guid, + &e->lease_key); +} + static bool delay_for_oplock(files_struct *fsp, int oplock_request, const struct smb2_lease *lease, @@ -2164,23 +2181,6 @@ static NTSTATUS grant_fsp_lease(struct files_struct *fsp, return status; } -static bool is_same_lease(const files_struct *fsp, - const struct share_mode_entry *e, - const struct smb2_lease *lease) -{ - if (e->op_type != LEASE_OPLOCK) { - return false; - } - if (lease == NULL) { - return false; - } - - return smb2_lease_equal(fsp_client_guid(fsp), - &lease->lease_key, - &e->client_guid, - &e->lease_key); -} - static int map_lease_type_to_oplock(uint32_t lease_type) { int result = NO_OPLOCK; |