From: Ralph Boehme Date: Tue, 28 Oct 2025 18:11:33 +0000 (+0100) Subject: smbd: reorder send_break_message() in delay_for_oplock_fn() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48aafb61f78df644eab9e069bc572a5cbefb9a03;p=thirdparty%2Fsamba.git smbd: reorder send_break_message() in delay_for_oplock_fn() No change in behaviour, reduces the diff of the subsequent commit. Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index c4b7daf787e..23f5cf39842 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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; }