From: Ralph Boehme Date: Sat, 30 Aug 2025 13:23:39 +0000 (+0200) Subject: smbd: notify scavenger of disconnected persistent handles in delay_for_oplock_fn() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a930102410127e2637519832030337d754c4b13f;p=thirdparty%2Fsamba.git smbd: notify scavenger of disconnected persistent handles in delay_for_oplock_fn() Adds an additional mechanism to trigger cleanup of possibly stale Persistent Handle state. Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index eaf9aaaa387..904d3018af9 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -44,6 +44,7 @@ #include "lib/util/time_basic.h" #include "lib/util/smb_strtox.h" #include "source3/smbd/dir.h" +#include "scavenger.h" #if defined(HAVE_LINUX_MAGIC_H) #include @@ -2427,6 +2428,12 @@ static bool delay_for_oplock_fn( if (e->protect) { uint32_t file_available_mask = SMB2_LEASE_HANDLE; + scavenger_schedule_disconnected( + fsp->conn->sconn->msg_ctx, + e->share_file_id, + &fsp->file_id, + fsp->name_hash); + if (file_has_brlocks(fsp)) { /* * If a file has byterange locks, require an exclusive