From: Hans Verkuil <hans.verk...@cisco.com>

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

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
---
 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-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to