[RFCv7 PATCH 4/4] unix/af_unix.c: use poll_requested_events() in unix_dgram_poll()

From: Hans Verkuil
Date: Thu Feb 02 2012 - 05:28:33 EST


From: Hans Verkuil <hans.verkuil@xxxxxxxxx>

Rather than accessing the poll_table internals use the new
poll_requested_events() function.

Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
---
net/unix/af_unix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 85d3bb7..59f5202 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2175,7 +2175,7 @@ static unsigned int unix_dgram_poll(struct file *file, struct socket *sock,
}

/* No write status requested, avoid expensive OUT tests. */
- if (wait && !(wait->key & (POLLWRBAND | POLLWRNORM | POLLOUT)))
+ if (!(poll_requested_events(wait) & (POLLWRBAND | POLLWRNORM | POLLOUT)))
return mask;

writable = unix_writable(sk);
--
1.7.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/