From 71c9fd73d42e092cf65de25fb7773fc1395ff601 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 10 Aug 2019 14:28:51 +0200 Subject: [PATCH] smbd: Simplify is_same_lease() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It does not use "struct share_mode_data" Signed-off-by: Volker Lendecke Reviewed-by: Ralph Böhme --- source3/smbd/open.c | 3 +-- 1 file changed, 1 insertion(+), 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 -- 2.47.3