CLEANUP: fd: remove the unused "new" field
This field has been unused since 1.6, it's only updated and never
tested. Let's remove it.
diff --git a/include/proto/fd.h b/include/proto/fd.h
index c9449ff..5885d0c 100644
--- a/include/proto/fd.h
+++ b/include/proto/fd.h
@@ -398,7 +398,6 @@
{
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
fdtab[fd].ev = 0;
- fdtab[fd].new = 1;
fdtab[fd].update_mask &= ~tid_bit;
fdtab[fd].linger_risk = 0;
fdtab[fd].cloned = 0;
diff --git a/include/types/fd.h b/include/types/fd.h
index da9f31e..e04ea67 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -101,7 +101,6 @@
unsigned int cache; /* position+1 in the FD cache. 0=not in cache. */
unsigned char state; /* FD state for read and write directions (2*3 bits) */
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
- unsigned char new:1; /* 1 if this fd has just been created */
unsigned char linger_risk:1; /* 1 if we must kill lingering before closing */
unsigned char cloned:1; /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */
};
diff --git a/src/cli.c b/src/cli.c
index cff59f2..ed8cc5b 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -794,7 +794,7 @@
li = fdt.owner;
chunk_printf(&trash,
- " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx umask=0x%lx",
+ " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx umask=0x%lx",
fd,
fdt.state,
(fdt.state & FD_EV_POLLED_R) ? 'P' : 'p',
@@ -809,7 +809,6 @@
(fdt.ev & FD_POLL_OUT) ? 'O' : 'o',
(fdt.ev & FD_POLL_PRI) ? 'P' : 'p',
(fdt.ev & FD_POLL_IN) ? 'I' : 'i',
- fdt.new ? 'N' : 'n',
fdt.linger_risk ? 'L' : 'l',
fdt.cloned ? 'C' : 'c',
fdt.cache,
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index baa6770..0dd908d 100644
--- a/src/ev_epoll.c
+++ b/src/ev_epoll.c
@@ -81,8 +81,6 @@
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
fdtab[fd].update_mask &= ~tid_bit;
- fdtab[fd].new = 0;
-
eo = fdtab[fd].state;
en = fd_compute_new_polled_status(eo);
fdtab[fd].state = en;
diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c
index 0346ec4..6169e63 100644
--- a/src/ev_kqueue.c
+++ b/src/ev_kqueue.c
@@ -54,8 +54,6 @@
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
fdtab[fd].update_mask &= ~tid_bit;
- fdtab[fd].new = 0;
-
eo = fdtab[fd].state;
en = fd_compute_new_polled_status(eo);
fdtab[fd].state = en;
diff --git a/src/ev_poll.c b/src/ev_poll.c
index 2460a67..715314c 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -84,8 +84,6 @@
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
fdtab[fd].update_mask &= ~tid_bit;
- fdtab[fd].new = 0;
-
eo = fdtab[fd].state;
en = fd_compute_new_polled_status(eo);
fdtab[fd].state = en;
diff --git a/src/ev_select.c b/src/ev_select.c
index 9d53a85..2a62ba9 100644
--- a/src/ev_select.c
+++ b/src/ev_select.c
@@ -66,8 +66,6 @@
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
fdtab[fd].update_mask &= ~tid_bit;
- fdtab[fd].new = 0;
-
eo = fdtab[fd].state;
en = fd_compute_new_polled_status(eo);
fdtab[fd].state = en;
diff --git a/src/fd.c b/src/fd.c
index 9398364..a47b61a 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -198,7 +198,6 @@
fdinfo[fd].port_range = NULL;
fdtab[fd].owner = NULL;
fdtab[fd].update_mask &= ~tid_bit;
- fdtab[fd].new = 0;
fdtab[fd].thread_mask = 0;
if (do_close) {
fdtab[fd].polled_mask = 0;