]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify is_same_lease()
authorVolker Lendecke <vl@samba.org>
Sat, 10 Aug 2019 12:28:51 +0000 (14:28 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 19 Aug 2019 23:14:38 +0000 (23:14 +0000)
It does not use "struct share_mode_data"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/smbd/open.c

index a28f70fbc4170780f8f55fe51dad9547204eefb4..d889faedb440b8cdfd0ee5f684f2cbb33277e990 100644 (file)
@@ -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