Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull aio updates from Al Viro: "Majority of AIO stuff this cycle. aio-fsync and aio-poll, mostly. The only thing I'm holding back for a day or so is Adam's aio ioprio - his last-minute fixup is trivial (missing stub in !CONFIG_BLOCK case), but let it sit in -next for decency sake..." * 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) aio: sanitize the limit checking in io_submit(2) aio: fold do_io_submit() into callers aio: shift copyin of iocb into io_submit_one() aio_read_events_ring(): make a bit more readable aio: all callers of aio_{read,write,fsync,poll} treat 0 and -EIOCBQUEUED the same way aio: take list removal to (some) callers of aio_complete() aio: add missing break for the IOCB_CMD_FDSYNC case random: convert to ->poll_mask timerfd: convert to ->poll_mask eventfd: switch to ->poll_mask pipe: convert to ->poll_mask crypto: af_alg: convert to ->poll_mask net/rxrpc: convert to ->poll_mask net/iucv: convert to ->poll_mask net/phonet: convert to ->poll_mask net/nfc: convert to ->poll_mask net/caif: convert to ->poll_mask net/bluetooth: convert to ->poll_mask net/sctp: convert to ->poll_mask net/tipc: convert to ->poll_mask ...
This commit is contained in:
@@ -2501,7 +2501,7 @@ int compat_udp_getsockopt(struct sock *sk, int level, int optname,
|
||||
* udp_poll - wait for a UDP event.
|
||||
* @file - file struct
|
||||
* @sock - socket
|
||||
* @wait - poll table
|
||||
* @events - events to wait for
|
||||
*
|
||||
* This is same as datagram poll, except for the special case of
|
||||
* blocking sockets. If application is using a blocking fd
|
||||
@@ -2510,23 +2510,23 @@ int compat_udp_getsockopt(struct sock *sk, int level, int optname,
|
||||
* but then block when reading it. Add special case code
|
||||
* to work around these arguably broken applications.
|
||||
*/
|
||||
__poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait)
|
||||
__poll_t udp_poll_mask(struct socket *sock, __poll_t events)
|
||||
{
|
||||
__poll_t mask = datagram_poll(file, sock, wait);
|
||||
__poll_t mask = datagram_poll_mask(sock, events);
|
||||
struct sock *sk = sock->sk;
|
||||
|
||||
if (!skb_queue_empty(&udp_sk(sk)->reader_queue))
|
||||
mask |= EPOLLIN | EPOLLRDNORM;
|
||||
|
||||
/* Check for false positives due to checksum errors */
|
||||
if ((mask & EPOLLRDNORM) && !(file->f_flags & O_NONBLOCK) &&
|
||||
if ((mask & EPOLLRDNORM) && !(sock->file->f_flags & O_NONBLOCK) &&
|
||||
!(sk->sk_shutdown & RCV_SHUTDOWN) && first_packet_length(sk) == -1)
|
||||
mask &= ~(EPOLLIN | EPOLLRDNORM);
|
||||
|
||||
return mask;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(udp_poll);
|
||||
EXPORT_SYMBOL(udp_poll_mask);
|
||||
|
||||
int udp_abort(struct sock *sk, int err)
|
||||
{
|
||||
|
Reference in New Issue
Block a user