mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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:
commit
408afb8d78
99 changed files with 891 additions and 637 deletions
|
@ -638,9 +638,8 @@ static int unix_stream_connect(struct socket *, struct sockaddr *,
|
|||
static int unix_socketpair(struct socket *, struct socket *);
|
||||
static int unix_accept(struct socket *, struct socket *, int, bool);
|
||||
static int unix_getname(struct socket *, struct sockaddr *, int);
|
||||
static __poll_t unix_poll(struct file *, struct socket *, poll_table *);
|
||||
static __poll_t unix_dgram_poll(struct file *, struct socket *,
|
||||
poll_table *);
|
||||
static __poll_t unix_poll_mask(struct socket *, __poll_t);
|
||||
static __poll_t unix_dgram_poll_mask(struct socket *, __poll_t);
|
||||
static int unix_ioctl(struct socket *, unsigned int, unsigned long);
|
||||
static int unix_shutdown(struct socket *, int);
|
||||
static int unix_stream_sendmsg(struct socket *, struct msghdr *, size_t);
|
||||
|
@ -681,7 +680,7 @@ static const struct proto_ops unix_stream_ops = {
|
|||
.socketpair = unix_socketpair,
|
||||
.accept = unix_accept,
|
||||
.getname = unix_getname,
|
||||
.poll = unix_poll,
|
||||
.poll_mask = unix_poll_mask,
|
||||
.ioctl = unix_ioctl,
|
||||
.listen = unix_listen,
|
||||
.shutdown = unix_shutdown,
|
||||
|
@ -704,7 +703,7 @@ static const struct proto_ops unix_dgram_ops = {
|
|||
.socketpair = unix_socketpair,
|
||||
.accept = sock_no_accept,
|
||||
.getname = unix_getname,
|
||||
.poll = unix_dgram_poll,
|
||||
.poll_mask = unix_dgram_poll_mask,
|
||||
.ioctl = unix_ioctl,
|
||||
.listen = sock_no_listen,
|
||||
.shutdown = unix_shutdown,
|
||||
|
@ -726,7 +725,7 @@ static const struct proto_ops unix_seqpacket_ops = {
|
|||
.socketpair = unix_socketpair,
|
||||
.accept = unix_accept,
|
||||
.getname = unix_getname,
|
||||
.poll = unix_dgram_poll,
|
||||
.poll_mask = unix_dgram_poll_mask,
|
||||
.ioctl = unix_ioctl,
|
||||
.listen = unix_listen,
|
||||
.shutdown = unix_shutdown,
|
||||
|
@ -2630,13 +2629,10 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
|||
return err;
|
||||
}
|
||||
|
||||
static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wait)
|
||||
static __poll_t unix_poll_mask(struct socket *sock, __poll_t events)
|
||||
{
|
||||
struct sock *sk = sock->sk;
|
||||
__poll_t mask;
|
||||
|
||||
sock_poll_wait(file, sk_sleep(sk), wait);
|
||||
mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
/* exceptional events? */
|
||||
if (sk->sk_err)
|
||||
|
@ -2665,15 +2661,11 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wa
|
|||
return mask;
|
||||
}
|
||||
|
||||
static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
|
||||
poll_table *wait)
|
||||
static __poll_t unix_dgram_poll_mask(struct socket *sock, __poll_t events)
|
||||
{
|
||||
struct sock *sk = sock->sk, *other;
|
||||
unsigned int writable;
|
||||
__poll_t mask;
|
||||
|
||||
sock_poll_wait(file, sk_sleep(sk), wait);
|
||||
mask = 0;
|
||||
int writable;
|
||||
__poll_t mask = 0;
|
||||
|
||||
/* exceptional events? */
|
||||
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
|
||||
|
@ -2699,7 +2691,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
|
|||
}
|
||||
|
||||
/* No write status requested, avoid expensive OUT tests. */
|
||||
if (!(poll_requested_events(wait) & (EPOLLWRBAND|EPOLLWRNORM|EPOLLOUT)))
|
||||
if (!(events & (EPOLLWRBAND|EPOLLWRNORM|EPOLLOUT)))
|
||||
return mask;
|
||||
|
||||
writable = unix_writable(sk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue