···121121#endif122122}123123124124-/* if this socket can poll_ll, tell the system call */125125-static inline __poll_t sock_poll_busy_flag(struct socket *sock)126126-{127127- return sk_can_busy_loop(sock->sk) ? POLL_BUSY_LOOP : 0;128128-}129129-130124/* used in the NIC receive handler to mark the skb */131125static inline void skb_mark_napi_id(struct sk_buff *skb,132126 struct napi_struct *napi)
+11-5
net/socket.c
···11301130static __poll_t sock_poll(struct file *file, poll_table *wait)11311131{11321132 struct socket *sock = file->private_data;11331133- __poll_t events = poll_requested_events(wait);11331133+ __poll_t events = poll_requested_events(wait), flag = 0;1134113411351135 if (!sock->ops->poll)11361136 return 0;1137113711381138- /* poll once if requested by the syscall */11391139- if (sk_can_busy_loop(sock->sk) && (events & POLL_BUSY_LOOP))11401140- sk_busy_loop(sock->sk, 1);11411141- return sock->ops->poll(file, sock, wait) | sock_poll_busy_flag(sock);11381138+ if (sk_can_busy_loop(sock->sk)) {11391139+ /* poll once if requested by the syscall */11401140+ if (events & POLL_BUSY_LOOP)11411141+ sk_busy_loop(sock->sk, 1);11421142+11431143+ /* if this socket can poll_ll, tell the system call */11441144+ flag = POLL_BUSY_LOOP;11451145+ }11461146+11471147+ return sock->ops->poll(file, sock, wait) | flag;11421148}1143114911441150static int sock_mmap(struct file *file, struct vm_area_struct *vma)