@@ -130,12 +130,6 @@ static inline void sock_poll_busy_loop(struct socket *sock, __poll_t events)
}
}
-/* if this socket can poll_ll, tell the system call */
-static inline __poll_t sock_poll_busy_flag(struct socket *sock)
-{
- return sk_can_busy_loop(sock->sk) ? POLL_BUSY_LOOP : 0;
-}
-
/* used in the NIC receive handler to mark the skb */
static inline void skb_mark_napi_id(struct sk_buff *skb,
struct napi_struct *napi)
@@ -1171,7 +1171,10 @@ static __poll_t sock_poll(struct file *file, poll_table *wait)
mask = sock->ops->poll_mask(sock, events);
}
- return mask | sock_poll_busy_flag(sock);
+ /* this socket can poll_ll so tell the system call */
+ if (sk_can_busy_loop(sock->sk))
+ mask |= POLL_BUSY_LOOP;
+ return mask;
}
static int sock_mmap(struct file *file, struct vm_area_struct *vma)
Can simplify be inlined into the only caller. Signed-off-by: Christoph Hellwig <hch@lst.de> --- include/net/busy_poll.h | 6 ------ net/socket.c | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-)