From 8e021cfefdcd6f521770c8951dd45cf771d4cc80 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sun, 31 Oct 2010 05:38:25 +0000 Subject: [PATCH] --- yaml --- r: 224117 b: refs/heads/master c: 973a34aa8593dbfe84386343c694f5beecb51d8a h: refs/heads/master i: 224115: 9a8bb64c9155e0d6a54ee47ab259d0cdb34f0e74 v: v3 --- [refs] | 2 +- trunk/net/unix/af_unix.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d338f807b26c..a4bdbe6e0f6a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5456f09aaf88731e16dbcea7522cb330b6846415 +refs/heads/master: 973a34aa8593dbfe84386343c694f5beecb51d8a diff --git a/trunk/net/unix/af_unix.c b/trunk/net/unix/af_unix.c index e8898758dd31..7ff31c60186a 100644 --- a/trunk/net/unix/af_unix.c +++ b/trunk/net/unix/af_unix.c @@ -2091,6 +2091,10 @@ static unsigned int unix_dgram_poll(struct file *file, struct socket *sock, return mask; } + /* No write status requested, avoid expensive OUT tests. */ + if (wait && !(wait->key & (POLLWRBAND | POLLWRNORM | POLLOUT))) + return mask; + writable = unix_writable(sk); other = unix_peer_get(sk); if (other) {