From: Ralph Boehme Date: Tue, 19 Nov 2024 19:00:49 +0000 (+0100) Subject: smbd: only call scavenger_schedule_disconnected() if smbXsrv_open_close() succeeded X-Git-Tag: tevent-0.17.0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c98e5f8a2addaabcd6cbfce94a87e30590e6198f;p=thirdparty%2Fsamba.git smbd: only call scavenger_schedule_disconnected() if smbXsrv_open_close() succeeded BUG: https://bugzilla.samba.org/show_bug.cgi?id=15649 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15651 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/close.c b/source3/smbd/close.c index e0fc4618209..ce04056fc34 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -892,7 +892,6 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp, "proceeding with normal close\n", fsp_str_dbg(fsp), nt_errstr(tmp))); } - scavenger_schedule_disconnected(fsp); } else { DEBUG(1, ("Failed to disconnect durable handle for " "file %s: %s - proceeding with normal " @@ -912,6 +911,7 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp, DEBUG(10, ("%s disconnected durable handle for file %s\n", conn->session_info->unix_info->unix_name, fsp_str_dbg(fsp))); + scavenger_schedule_disconnected(fsp); return NT_STATUS_OK; }