diff options
author | Volker Lendecke <vl@samba.org> | 2019-08-10 14:28:51 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-08-19 23:14:38 +0000 |
commit | 71c9fd73d42e092cf65de25fb7773fc1395ff601 (patch) | |
tree | 83d5ba489c3b29902c4f5b0072b3322fcf84a7de | |
parent | 9034cb39d7c0d8d6387f4977f894349db187d6b5 (diff) | |
download | samba-71c9fd73d42e092cf65de25fb7773fc1395ff601.tar.gz |
smbd: Simplify is_same_lease()
It does not use "struct share_mode_data"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
-rw-r--r-- | source3/smbd/open.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a28f70fbc41..d889faedb44 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2165,7 +2165,6 @@ static NTSTATUS grant_fsp_lease(struct files_struct *fsp, } static bool is_same_lease(const files_struct *fsp, - const struct share_mode_data *d, const struct share_mode_entry *e, const struct smb2_lease *lease) { @@ -2266,7 +2265,7 @@ static NTSTATUS grant_fsp_oplock_type(struct smb_request *req, struct share_mode_entry *e = &d->share_modes[i]; if ((granted & SMB2_LEASE_WRITE) && - !is_same_lease(fsp, d, e, lease) && + !is_same_lease(fsp, e, lease) && !share_mode_stale_pid(d, i)) { /* * Can grant only one writer |