file_id_str_buf(ctx->msg.file_id, &idbuf),
timeval_string(talloc_tos(), &t, true));
+ status = smbXsrv_open_cleanup(ctx->msg.open_persistent_id);
+ if (!NT_STATUS_IS_OK(status)) {
+ DBG_WARNING("Failed to cleanup open global for file %s open "
+ "%"PRIu64": %s\n",
+ file_id_str_buf(ctx->msg.file_id, &idbuf),
+ ctx->msg.open_persistent_id,
+ nt_errstr(status));
+ return;
+ }
+
ok = share_mode_cleanup_disconnected(ctx->msg.file_id,
ctx->msg.open_persistent_id);
if (!ok) {
ctx->msg.open_persistent_id);
}
- status = smbXsrv_open_cleanup(ctx->msg.open_persistent_id);
- if (!NT_STATUS_IS_OK(status)) {
- DBG_WARNING("Failed to cleanup open global for file %s open "
- "%"PRIu64": %s\n",
- file_id_str_buf(ctx->msg.file_id, &idbuf),
- ctx->msg.open_persistent_id,
- nt_errstr(status));
- }
}
static void scavenger_add_timer(struct smbd_scavenger_state *state,
}
if (!delete_open) {
- state->status = NT_STATUS_OK;
+ state->status = NT_STATUS_CANNOT_DELETE;
return;
}
do_delete:
"deleted record from %s\n",
state->global_id,
dbwrap_name(dbwrap_record_get_db(rec)));
+ state->status = NT_STATUS_OK;
}
NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id)