mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Don't defer closing of FDs in clvmd as it can cause trouble.
This commit is contained in:
parent
42401a6537
commit
5a3f4a794d
@ -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
|
||||
==============================
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user