]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: reorder send_break_message() in delay_for_oplock_fn()
authorRalph Boehme <slow@samba.org>
Tue, 28 Oct 2025 18:11:33 +0000 (19:11 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:36 +0000 (10:18 +0000)
No change in behaviour, reduces the diff of the subsequent commit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/open.c

index c4b7daf787ec42e17496f58e77fba128d94f01c0..23f5cf39842a1ebdfab398846a4f9561408fbb8e 100644 (file)
@@ -2444,11 +2444,6 @@ static bool delay_for_oplock_fn(
                break_to &= ~(SMB2_LEASE_HANDLE|SMB2_LEASE_WRITE);
        }
 
-       DBG_DEBUG("breaking from %d to %d\n",
-                 (int)e_lease_type,
-                 (int)break_to);
-       send_break_message(
-               fsp->conn->sconn->msg_ctx, &fsp->file_id, e, break_to);
        if (e_lease_type & state->delay_mask) {
                state->delay = true;
        }
@@ -2456,6 +2451,12 @@ static bool delay_for_oplock_fn(
                state->delay = true;
        }
 
+       DBG_DEBUG("breaking from %d to %d\n",
+                 (int)e_lease_type,
+                 (int)break_to);
+       send_break_message(
+               fsp->conn->sconn->msg_ctx, &fsp->file_id, e, break_to);
+
        if (!state->delay) {
                return false;
        }