From: Ralph Boehme Date: Tue, 2 Dec 2025 18:58:41 +0000 (+0100) Subject: vfs_default: remove redundant checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8bb8445234412a19a1497417a472bc2192e1dc9;p=thirdparty%2Fsamba.git vfs_default: remove redundant checks This stuff has already been checked by share_mode_entry_durable_reconnect_fn(). Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c index 5d153babf2c..aad56d90436 100644 --- a/source3/smbd/durable.c +++ b/source3/smbd/durable.c @@ -632,24 +632,6 @@ static void vfs_default_durable_reconnect_fn(struct share_mode_lock *lck, goto fail; } - if (!server_id_is_disconnected(&e.pid)) { - DEBUG(5, ("vfs_default_durable_reconnect: denying durable " - "reconnect for handle that was not marked " - "disconnected (e.g. smbd or cluster node died)\n")); - state->status = NT_STATUS_OBJECT_NAME_NOT_FOUND; - goto fail; - } - - if (e.share_file_id != state->op->global->open_persistent_id) { - DBG_INFO("denying durable " - "share_file_id changed %"PRIu64" != %"PRIu64" " - "(e.g. another client had opened the file)\n", - e.share_file_id, - state->op->global->open_persistent_id); - state->status = NT_STATUS_OBJECT_NAME_NOT_FOUND; - goto fail; - } - if ((e.access_mask & (FILE_WRITE_DATA|FILE_APPEND_DATA)) && !CAN_WRITE(fsp->conn)) {