aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-31 10:36:32 -0500
committerChristoph Hellwig <hch@lst.de>2018-05-26 03:16:44 -0400
commit4df7338f6f4a3519f38ce523000f79e74ec25fe4 (patch)
tree36008c69d0c7c08481ebb3f36f61f02bd0fb8f43 /net/tipc/socket.c
parent31f50b557318d787474a28c3e075f518cdcb5278 (diff)
net/tipc: convert to ->poll_mask
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 252a52ae0893..58549338582a 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 */
712static __poll_t tipc_poll(struct file *file, struct socket *sock, 711static __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)
@@ -3027,7 +3023,7 @@ static const struct proto_ops msg_ops = {
3027 .socketpair = tipc_socketpair, 3023 .socketpair = tipc_socketpair,
3028 .accept = sock_no_accept, 3024 .accept = sock_no_accept,
3029 .getname = tipc_getname, 3025 .getname = tipc_getname,
3030 .poll = tipc_poll, 3026 .poll_mask = tipc_poll_mask,
3031 .ioctl = tipc_ioctl, 3027 .ioctl = tipc_ioctl,
3032 .listen = sock_no_listen, 3028 .listen = sock_no_listen,
3033 .shutdown = tipc_shutdown, 3029 .shutdown = tipc_shutdown,
@@ -3048,7 +3044,7 @@ static const struct proto_ops packet_ops = {
3048 .socketpair = tipc_socketpair, 3044 .socketpair = tipc_socketpair,
3049 .accept = tipc_accept, 3045 .accept = tipc_accept,
3050 .getname = tipc_getname, 3046 .getname = tipc_getname,
3051 .poll = tipc_poll, 3047 .poll_mask = tipc_poll_mask,
3052 .ioctl = tipc_ioctl, 3048 .ioctl = tipc_ioctl,
3053 .listen = tipc_listen, 3049 .listen = tipc_listen,
3054 .shutdown = tipc_shutdown, 3050 .shutdown = tipc_shutdown,
@@ -3069,7 +3065,7 @@ static const struct proto_ops stream_ops = {
3069 .socketpair = tipc_socketpair, 3065 .socketpair = tipc_socketpair,
3070 .accept = tipc_accept, 3066 .accept = tipc_accept,
3071 .getname = tipc_getname, 3067 .getname = tipc_getname,
3072 .poll = tipc_poll, 3068 .poll_mask = tipc_poll_mask,
3073 .ioctl = tipc_ioctl, 3069 .ioctl = tipc_ioctl,
3074 .listen = tipc_listen, 3070 .listen = tipc_listen,
3075 .shutdown = tipc_shutdown, 3071 .shutdown = tipc_shutdown,