diff --git a/WHATS_NEW b/WHATS_NEW index c23eda52c..020128fff 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -36,6 +36,7 @@ Version 2.01.11 - lv_reduce tidying. Remove some unnecessary parameters. Introduce seg_is macros. + Don't defer closing dead FDs in clvmd. Version 2.01.10 - 3rd May 2005 ============================== diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index 6a5e5522a..6a0c18697 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -578,6 +578,7 @@ static void main_loop(int local_sock, int cmd_timeout) lastfd->next = thisfd->next; free_fd = thisfd; thisfd = lastfd; + close(free_fd->fd); /* Queue cleanup, this also frees the client struct */ add_to_lvmqueue(free_fd, NULL, 0, NULL); @@ -1610,7 +1611,6 @@ static int process_work_item(struct lvm_thread_cmd *cmd) /* If msg is NULL then this is a cleanup request */ if (cmd->msg == NULL) { DEBUGLOG("process_work_item: free fd %d\n", cmd->client->fd); - close(cmd->client->fd); cmd_client_cleanup(cmd->client); free(cmd->client); return 0; diff --git a/daemons/clvmd/tcp-comms.c b/daemons/clvmd/tcp-comms.c index ce66a4602..b51d52382 100644 --- a/daemons/clvmd/tcp-comms.c +++ b/daemons/clvmd/tcp-comms.c @@ -106,6 +106,7 @@ void tcp_remove_client(char *csid) { hash_remove_binary(sock_hash, csid, GULM_MAX_CSID_LEN); client->removeme = 1; + close(client->fd); } /* Look for a mangled one too */ @@ -116,6 +117,7 @@ void tcp_remove_client(char *csid) { hash_remove_binary(sock_hash, csid, GULM_MAX_CSID_LEN); client->removeme = 1; + close(client->fd); } /* Put it back as we found it */