Commit 70efce27 authored by Will Newton's avatar Will Newton Committed by David S. Miller

net/ipv4/tcp.c: Fix use of PULLHUP instead of POLLHUP in comments.

Change PULLHUP to POLLHUP in tcp_poll comments and clean up another
comment for grammar and coding style.
Signed-off-by: default avatarWill Newton <will.newton@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7b1c65fa
...@@ -344,8 +344,8 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) ...@@ -344,8 +344,8 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
return inet_csk_listen_poll(sk); return inet_csk_listen_poll(sk);
/* Socket is not locked. We are protected from async events /* Socket is not locked. We are protected from async events
by poll logic and correct handling of state changes * by poll logic and correct handling of state changes
made by another threads is impossible in any case. * made by other threads is impossible in any case.
*/ */
mask = 0; mask = 0;
...@@ -371,10 +371,10 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) ...@@ -371,10 +371,10 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
* in state CLOSE_WAIT. One solution is evident --- to set POLLHUP * in state CLOSE_WAIT. One solution is evident --- to set POLLHUP
* if and only if shutdown has been made in both directions. * if and only if shutdown has been made in both directions.
* Actually, it is interesting to look how Solaris and DUX * Actually, it is interesting to look how Solaris and DUX
* solve this dilemma. I would prefer, if PULLHUP were maskable, * solve this dilemma. I would prefer, if POLLHUP were maskable,
* then we could set it on SND_SHUTDOWN. BTW examples given * then we could set it on SND_SHUTDOWN. BTW examples given
* in Stevens' books assume exactly this behaviour, it explains * in Stevens' books assume exactly this behaviour, it explains
* why PULLHUP is incompatible with POLLOUT. --ANK * why POLLHUP is incompatible with POLLOUT. --ANK
* *
* NOTE. Check for TCP_CLOSE is added. The goal is to prevent * NOTE. Check for TCP_CLOSE is added. The goal is to prevent
* blocking on fresh not-connected or disconnected socket. --ANK * blocking on fresh not-connected or disconnected socket. --ANK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment