diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-04 16:57:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-04 16:57:43 -0400 |
commit | 408afb8d7847faea115508ba154346e33edfc7d5 (patch) | |
tree | 9b558f8477d7400ad5e8849c2624471915654ade /net/tipc/socket.c | |
parent | b058efc1acfd99027b4c70458e72c3d20a1a5bbc (diff) | |
parent | 1da92779e2e8f309d5aecbbed346e7f812b174e8 (diff) |
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
...
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6be21575503a..3bb45042e833 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -692,10 +692,9 @@ static int tipc_getname(struct socket *sock, struct sockaddr *uaddr, | |||
692 | } | 692 | } |
693 | 693 | ||
694 | /** | 694 | /** |
695 | * tipc_poll - read and possibly block on pollmask | 695 | * tipc_poll - read pollmask |
696 | * @file: file structure associated with the socket | 696 | * @file: file structure associated with the socket |
697 | * @sock: socket for which to calculate the poll bits | 697 | * @sock: socket for which to calculate the poll bits |
698 | * @wait: ??? | ||
699 | * | 698 | * |
700 | * Returns pollmask value | 699 | * Returns pollmask value |
701 | * | 700 | * |
@@ -709,15 +708,12 @@ static int tipc_getname(struct socket *sock, struct sockaddr *uaddr, | |||
709 | * imply that the operation will succeed, merely that it should be performed | 708 | * imply that the operation will succeed, merely that it should be performed |
710 | * and will not block. | 709 | * and will not block. |
711 | */ | 710 | */ |
712 | static __poll_t tipc_poll(struct file *file, struct socket *sock, | 711 | static __poll_t tipc_poll_mask(struct socket *sock, __poll_t events) |
713 | poll_table *wait) | ||
714 | { | 712 | { |
715 | struct sock *sk = sock->sk; | 713 | struct sock *sk = sock->sk; |
716 | struct tipc_sock *tsk = tipc_sk(sk); | 714 | struct tipc_sock *tsk = tipc_sk(sk); |
717 | __poll_t revents = 0; | 715 | __poll_t revents = 0; |
718 | 716 | ||
719 | sock_poll_wait(file, sk_sleep(sk), wait); | ||
720 | |||
721 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 717 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
722 | revents |= EPOLLRDHUP | EPOLLIN | EPOLLRDNORM; | 718 | revents |= EPOLLRDHUP | EPOLLIN | EPOLLRDNORM; |
723 | if (sk->sk_shutdown == SHUTDOWN_MASK) | 719 | if (sk->sk_shutdown == SHUTDOWN_MASK) |
@@ -3028,7 +3024,7 @@ static const struct proto_ops msg_ops = { | |||
3028 | .socketpair = tipc_socketpair, | 3024 | .socketpair = tipc_socketpair, |
3029 | .accept = sock_no_accept, | 3025 | .accept = sock_no_accept, |
3030 | .getname = tipc_getname, | 3026 | .getname = tipc_getname, |
3031 | .poll = tipc_poll, | 3027 | .poll_mask = tipc_poll_mask, |
3032 | .ioctl = tipc_ioctl, | 3028 | .ioctl = tipc_ioctl, |
3033 | .listen = sock_no_listen, | 3029 | .listen = sock_no_listen, |
3034 | .shutdown = tipc_shutdown, | 3030 | .shutdown = tipc_shutdown, |
@@ -3049,7 +3045,7 @@ static const struct proto_ops packet_ops = { | |||
3049 | .socketpair = tipc_socketpair, | 3045 | .socketpair = tipc_socketpair, |
3050 | .accept = tipc_accept, | 3046 | .accept = tipc_accept, |
3051 | .getname = tipc_getname, | 3047 | .getname = tipc_getname, |
3052 | .poll = tipc_poll, | 3048 | .poll_mask = tipc_poll_mask, |
3053 | .ioctl = tipc_ioctl, | 3049 | .ioctl = tipc_ioctl, |
3054 | .listen = tipc_listen, | 3050 | .listen = tipc_listen, |
3055 | .shutdown = tipc_shutdown, | 3051 | .shutdown = tipc_shutdown, |
@@ -3070,7 +3066,7 @@ static const struct proto_ops stream_ops = { | |||
3070 | .socketpair = tipc_socketpair, | 3066 | .socketpair = tipc_socketpair, |
3071 | .accept = tipc_accept, | 3067 | .accept = tipc_accept, |
3072 | .getname = tipc_getname, | 3068 | .getname = tipc_getname, |
3073 | .poll = tipc_poll, | 3069 | .poll_mask = tipc_poll_mask, |
3074 | .ioctl = tipc_ioctl, | 3070 | .ioctl = tipc_ioctl, |
3075 | .listen = tipc_listen, | 3071 | .listen = tipc_listen, |
3076 | .shutdown = tipc_shutdown, | 3072 | .shutdown = tipc_shutdown, |