poll: add poll_requested_events() and poll_does_not_wait() functions
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / net / sock.h
index 04bc0b30e9e9067320eaeb7c43d1def462771e6d..a6ba1f8871fda3077183717a1e099cd5161b555c 100644 (file)
@@ -1854,7 +1854,7 @@ static inline bool wq_has_sleeper(struct socket_wq *wq)
 static inline void sock_poll_wait(struct file *filp,
                wait_queue_head_t *wait_address, poll_table *p)
 {
-       if (p && wait_address) {
+       if (!poll_does_not_wait(p) && wait_address) {
                poll_wait(filp, wait_address, p);
                /*
                 * We need to be sure we are in sync with the