return NT_STATUS_OK;
}
-static bool close_file_in_loop(struct files_struct *fsp)
+static bool close_file_in_loop(struct files_struct *fsp,
+ enum file_close_type close_type)
{
if (fsp->base_fsp != NULL) {
/*
fsp->base_fsp->stream_fsp = NULL;
fsp->base_fsp = NULL;
- close_file_free(NULL, &fsp, SHUTDOWN_CLOSE);
+ close_file_free(NULL, &fsp, close_type);
return NULL;
}
return false;
}
- close_file_free(NULL, &fsp, SHUTDOWN_CLOSE);
+ close_file_free(NULL, &fsp, close_type);
return true;
}
struct file_close_conn_state {
struct connection_struct *conn;
+ enum file_close_type close_type;
bool fsp_left_behind;
};
fsp->op->global->durable = false;
}
- did_close = close_file_in_loop(fsp);
+ did_close = close_file_in_loop(fsp, state->close_type);
if (!did_close) {
state->fsp_left_behind = true;
}
void file_close_conn(connection_struct *conn, enum file_close_type close_type)
{
- struct file_close_conn_state state = { .conn = conn };
+ struct file_close_conn_state state = { .conn = conn,
+ .close_type = close_type };
files_forall(conn->sconn, file_close_conn_fn, &state);
return NULL;
}
- did_close = close_file_in_loop(fsp);
+ did_close = close_file_in_loop(fsp, SHUTDOWN_CLOSE);
if (!did_close) {
state->fsp_left_behind = true;
}