From: Volker Lendecke Date: Sat, 10 Aug 2019 12:28:51 +0000 (+0200) Subject: smbd: Simplify is_same_lease() X-Git-Tag: tdb-1.4.2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71c9fd73d42e092cf65de25fb7773fc1395ff601;p=thirdparty%2Fsamba.git smbd: Simplify is_same_lease() It does not use "struct share_mode_data" Signed-off-by: Volker Lendecke Reviewed-by: Ralph Böhme --- 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