]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify delay_for_oplock()
authorVolker Lendecke <vl@samba.org>
Sat, 10 Aug 2019 13:01:24 +0000 (15:01 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 19 Aug 2019 23:14:38 +0000 (23:14 +0000)
Use is_same_lease()

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

index 262143fcdabc91baa3563ca063e06497aa39239b..cea3d882637c6cf5002135e523efc2ce20c77548 100644 (file)
@@ -1888,11 +1888,7 @@ static bool delay_for_oplock(files_struct *fsp,
                        NTSTATUS status;
 
                        if (lease != NULL) {
-                               bool our_lease = smb2_lease_equal(
-                                       fsp_client_guid(fsp),
-                                       &lease->lease_key,
-                                       &e->client_guid,
-                                       &e->lease_key);
+                               bool our_lease = is_same_lease(fsp, e, lease);
                                if (our_lease) {
                                        DBG_DEBUG("Ignoring our own lease\n");
                                        continue;