From: Ralph Boehme Date: Fri, 23 Jan 2026 10:27:28 +0000 (+0100) Subject: smbd: in contend_dirleases() don't bother checking when not enabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=thirdparty%2Fsamba.git smbd: in contend_dirleases() don't bother checking when not enabled BUG: https://bugzilla.samba.org/show_bug.cgi?id=15984 Signed-off-by: Ralph Boehme Reviewed-by: Martin Schwenke Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Mon Jan 26 12:09:13 UTC 2026 on atb-devel-224 --- diff --git a/source3/smbd/smb2_oplock.c b/source3/smbd/smb2_oplock.c index 5c2a1ae848f..8f1e8540818 100644 --- a/source3/smbd/smb2_oplock.c +++ b/source3/smbd/smb2_oplock.c @@ -1316,6 +1316,10 @@ void contend_dirleases(struct connection_struct *conn, int ret; bool ok; + if (!lp_smb3_directory_leases()) { + return; + } + if (lease != NULL) { DBG_DEBUG("Parent leasekey %"PRIx64"/%"PRIx64"\n", lease->parent_lease_key.data[0],