Received: by 10.223.176.46 with SMTP id f43csp3331141wra; Mon, 22 Jan 2018 12:15:02 -0800 (PST) X-Google-Smtp-Source: AH8x225ffDdF2yg7hF6DUeeEubU1FGQoaET8O87Y8ILuhyEUcBRWzdtdv4UBWn99ea4tOYnAzcFj X-Received: by 10.107.169.142 with SMTP id f14mr151932ioj.56.1516652102546; Mon, 22 Jan 2018 12:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516652102; cv=none; d=google.com; s=arc-20160816; b=ZBncswynJ5OKIqX6yQPtDSt14o1ONytAn7Ay7DVVbNHnXFDgznPp9VNCkzvSCl+PJk nqayQS1kUHL9yk70a5n9RnGxCiXRX+g2+yJeSkvCBYdjBsUTsfUZ+2RgpH/tWAI4yWqr VctfPISy5qd1WS4u9+OMu52sAvo75PK8ex8MdqV5G0bX9x82Ubyz9NQNA3VZiYLsw0hf SsM+P/Qtjss6BFk7OMJ0pceuM5NPYtdiqdhZvKSon4ERRXkjMtjKS9OSnkREpweUtfgj rhoxBiiKJFMKkQlhLkYbm29z8N1V6rLbbpE2hxYb9CIpKJJT3Zdi9WzU5MXGsZOk4+LK 3J5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MqcnWC+oKvChrPoG0D2aK+fEMIWN2CkFDqjMkzX65I0=; b=SzSA5gt8u+EEJsc9kTosJW545ejYnXLZoVaRQL2v5U3dJy0+68riYIjeggDKrSh/dX xSI5pDRpNXSxPyepIsr5Ayfu5wcFl5DCKwjYkrSPWooREaI1XslNIu6IlZ5Yvl05d4dz 6ObdSmkH5QymtkcCcHOuqjq4ET2KxraU47ZGcTaQ/avO6R98g5VDDogmP+9L+t7pyTRP bbsXMgTcX7clTFS0VeNnK71x4WmkK7QNPrZWSKrTvit7eZ0D5hfmDJM4J6C6yLkDWcOh Ras+PBPCZ5LCkVEzzup6bfu6wwpPFOGLiTDqpYEiF9SGtYoUUyrh+LkrfZbc8ewOzjKw 5H8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tpY8dDX2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si6429627ith.23.2018.01.22.12.14.49; Mon, 22 Jan 2018 12:15:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tpY8dDX2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751724AbeAVUOB (ORCPT + 99 others); Mon, 22 Jan 2018 15:14:01 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:35565 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751242AbeAVUN5 (ORCPT ); Mon, 22 Jan 2018 15:13:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MqcnWC+oKvChrPoG0D2aK+fEMIWN2CkFDqjMkzX65I0=; b=tpY8dDX2zn/Hw2D+bFW/XpuDu iuNebjtqAEGZfBuVjRtdJ9TH9wuXRiVZftYvR2hC9pLuCrA8C9PmDpjqCE23QUzO6L4JdIn10LTKy vkpWUuP7L1khl7TZQLvNdaocg4uA6DFNBPN6e82uJvfi9Hdjic5KWCTbvG8H7oM9Vt+YdG42gzKtF pzHPg45vy5u9plIJCqlLeZTUFX6I/UFegeRgyRRazkwTgFcgR6EOfF6IV4RMiOPDx3Bd0QPOa/GoW Tv1S0w6bR+XB0OwQGHyPLoNAlUWBhjYtgnn5VCzNX6t9hg8GL+cE6LD2+cV2FlqK+ZgoT2HOim7Ev q3vsb7P3A==; Received: from 178.114.226.247.wireless.dyn.drei.com ([178.114.226.247] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ediTb-0007gU-9x; Mon, 22 Jan 2018 20:13:55 +0000 From: Christoph Hellwig To: viro@zeniv.linux.org.uk Cc: Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/36] net/dccp: convert to ->poll_mask Date: Mon, 22 Jan 2018 21:12:28 +0100 Message-Id: <20180122201243.31610-22-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180122201243.31610-1-hch@lst.de> References: <20180122201243.31610-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Christoph Hellwig --- net/dccp/dccp.h | 3 +-- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/dccp/proto.c | 13 ++----------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index f91e3816806b..0ea2ee56ac1b 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -316,8 +316,7 @@ int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len); void dccp_shutdown(struct sock *sk, int how); int inet_dccp_listen(struct socket *sock, int backlog); -__poll_t dccp_poll(struct file *file, struct socket *sock, - poll_table *wait); +__poll_t dccp_poll_mask(struct socket *sock, __poll_t events); int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); void dccp_req_err(struct sock *sk, u64 seq); diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index e65fcb45c3f6..e8476f319efd 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -983,7 +983,7 @@ static const struct proto_ops inet_dccp_ops = { .accept = inet_accept, .getname = inet_getname, /* FIXME: work on tcp_poll to rename it to inet_csk_poll */ - .poll = dccp_poll, + .poll_mask = dccp_poll_mask, .ioctl = inet_ioctl, /* FIXME: work on inet_listen to rename it to sock_common_listen */ .listen = inet_dccp_listen, diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 5df7857fc0f3..f0aac8e4b888 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -1069,7 +1069,7 @@ static const struct proto_ops inet6_dccp_ops = { .socketpair = sock_no_socketpair, .accept = inet_accept, .getname = inet6_getname, - .poll = dccp_poll, + .poll_mask = dccp_poll_mask, .ioctl = inet6_ioctl, .listen = inet_dccp_listen, .shutdown = inet_shutdown, diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 8b8db3d481bd..11f91fbe7359 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -311,20 +311,11 @@ int dccp_disconnect(struct sock *sk, int flags) EXPORT_SYMBOL_GPL(dccp_disconnect); -/* - * Wait for a DCCP event. - * - * Note that we don't need to lock the socket, as the upper poll layers - * take care of normal races (between the test and the event) and we don't - * go look at any of the socket buffers directly. - */ -__poll_t dccp_poll(struct file *file, struct socket *sock, - poll_table *wait) +__poll_t dccp_poll_mask(struct socket *sock, __poll_t events) { __poll_t mask; struct sock *sk = sock->sk; - sock_poll_wait(file, sk_sleep(sk), wait); if (sk->sk_state == DCCP_LISTEN) return inet_csk_listen_poll(sk); @@ -366,7 +357,7 @@ __poll_t dccp_poll(struct file *file, struct socket *sock, return mask; } -EXPORT_SYMBOL_GPL(dccp_poll); +EXPORT_SYMBOL_GPL(dccp_poll_mask); int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg) { -- 2.14.2