diff options
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index e8898758dd31..7ff31c60186a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -2091,6 +2091,10 @@ static unsigned int unix_dgram_poll(struct file *file, struct socket *sock, | |||
2091 | return mask; | 2091 | return mask; |
2092 | } | 2092 | } |
2093 | 2093 | ||
2094 | /* No write status requested, avoid expensive OUT tests. */ | ||
2095 | if (wait && !(wait->key & (POLLWRBAND | POLLWRNORM | POLLOUT))) | ||
2096 | return mask; | ||
2097 | |||
2094 | writable = unix_writable(sk); | 2098 | writable = unix_writable(sk); |
2095 | other = unix_peer_get(sk); | 2099 | other = unix_peer_get(sk); |
2096 | if (other) { | 2100 | if (other) { |