]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: only call scavenger_schedule_disconnected() if smbXsrv_open_close() succeeded
authorRalph Boehme <slow@samba.org>
Tue, 19 Nov 2024 19:00:49 +0000 (20:00 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 6 Jun 2025 16:16:34 +0000 (16:16 +0000)
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 <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/close.c

index e0fc4618209861df32e081d4bf36f01a203390cd..ce04056fc34d0aca6d563c39a0f16a36d9ebddd5 100644 (file)
@@ -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;
        }