Received: by 10.223.176.46 with SMTP id f43csp3333409wra; Mon, 22 Jan 2018 12:17:19 -0800 (PST) X-Google-Smtp-Source: AH8x227XuG/WvO7aP/jYx2IeIH2Ay3voAA/Gnn6JaPVAGq7XJ91/65F6LBBqNG3VC+qbiH5wvVyF X-Received: by 10.107.185.212 with SMTP id j203mr87662iof.237.1516652239241; Mon, 22 Jan 2018 12:17:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516652239; cv=none; d=google.com; s=arc-20160816; b=Erx5dxK3zkcC8gIsyKESiocIMVJD9S0qEyMWqjWaosAgjtcTGvsZzVuPQ1rlcjHw0P TL/WsY6rWptDy/YFmkGwFYCaiXVv9fQuoQbXdwCe+FhK0Y525ud4/MxkXUNTqzTES6eC oyDoccXJ17GhqmDK/D4q64XqJcbq7VnP4C6ji2NoV+yI/LJv3VKSpKpxBmFyVdyMilhK Jioph+VcfmQn5DU8sKtdzCbeeXgXdYJS3ftHqqpjN+uRTVZls4rikXvsLXKJCYYsXm8P yEjXJYoAgtecUp/n4A0DAkaro9+2tkOvuRCFBz9qKXdi3yHXtEU0McvOz6N8nvO7VyYB 6zGw== 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=boV9DLJD6Uu1BDdjo2DU3vZ8RtaaQ7zcmWDDe+SQrCA=; b=kFnf0nSP0c9zymA9gkd5UQtg559smus2yej0vDP0M0z+dqx6OSfnHWubceOmIY3k0q OMHt4SK6O/VmThwFd1hhlZkK1Gn34sp4tsjh7LGxl7mLIto5t7tCBCB1XW+G/Bzv3rZQ GzDZoNV8qfMB4BpiUby98+ng9BBngB0O+o69Hx+9osE8WOeO9uuZztvYN3+3BzIdv71R PgeNSk83M5ksf3stS4BSkuh/t3rTh9R1ev13kDNh5vLivxzg7u1ERIrTza4sn8EVwT6X zEtGhn+DLTzj2dH9aTAghm5Gj9r9ovEPomYsqOviG2kNGcCD16UqXMPnSLZ5L1SZ3mlO nnmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Ww08AaiD; 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 w190si7843423iod.96.2018.01.22.12.17.06; Mon, 22 Jan 2018 12:17:19 -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=Ww08AaiD; 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 S1751958AbeAVUOe (ORCPT + 99 others); Mon, 22 Jan 2018 15:14:34 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:33739 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbeAVUOb (ORCPT ); Mon, 22 Jan 2018 15:14:31 -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=boV9DLJD6Uu1BDdjo2DU3vZ8RtaaQ7zcmWDDe+SQrCA=; b=Ww08AaiDGSCcBQOp0h/FkUAWg ljYJx41HDG3hoRxKC+noHhHXVcubNgWq7JNg7ZPek3C+DX/BjruQky7DAPBux5CczpcO633X9/xLS /BnjPNDq2X4FdoV6vhHcGkwZYuMobClF8cKRuueunQfBov6HUII326dydZobvqCL3Krdslsqcbr67 jQokHGM5KkkV2hBfaGeyx3M11r5J3D5kHwuN6m19yeIvgI3zDdoQBb63Ljfv4uvopk3+CGnMtks1/ YfuHsITxLi/2AVfKXnVkOeeGViXPGwMcppZn+vAwYdxgikJ+/sOmk4MUlwArj59PSDrodVyCfJlDC QIIKz1t6A==; 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 1ediU9-0007yJ-Mt; Mon, 22 Jan 2018 20:14:30 +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 32/36] crypto: af_alg: convert to ->poll_mask Date: Mon, 22 Jan 2018 21:12:39 +0100 Message-Id: <20180122201243.31610-33-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 --- crypto/af_alg.c | 13 +++---------- crypto/algif_aead.c | 4 ++-- crypto/algif_skcipher.c | 4 ++-- include/crypto/if_alg.h | 3 +-- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 592797ec8075..2639ffda4f4d 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -1058,19 +1058,12 @@ void af_alg_async_cb(struct crypto_async_request *_req, int err) } EXPORT_SYMBOL_GPL(af_alg_async_cb); -/** - * af_alg_poll - poll system call handler - */ -__poll_t af_alg_poll(struct file *file, struct socket *sock, - poll_table *wait) +__poll_t af_alg_poll_mask(struct socket *sock, __poll_t events) { struct sock *sk = sock->sk; struct alg_sock *ask = alg_sk(sk); struct af_alg_ctx *ctx = ask->private; - __poll_t mask; - - sock_poll_wait(file, sk_sleep(sk), wait); - mask = 0; + __poll_t mask = 0; if (!ctx->more || ctx->used) mask |= POLLIN | POLLRDNORM; @@ -1080,7 +1073,7 @@ __poll_t af_alg_poll(struct file *file, struct socket *sock, return mask; } -EXPORT_SYMBOL_GPL(af_alg_poll); +EXPORT_SYMBOL_GPL(af_alg_poll_mask); /** * af_alg_alloc_areq - allocate struct af_alg_async_req diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index ddcc45f77edd..0f726e55b0b1 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -376,7 +376,7 @@ static struct proto_ops algif_aead_ops = { .sendmsg = aead_sendmsg, .sendpage = af_alg_sendpage, .recvmsg = aead_recvmsg, - .poll = af_alg_poll, + .poll_mask = af_alg_poll_mask, }; static int aead_check_key(struct socket *sock) @@ -472,7 +472,7 @@ static struct proto_ops algif_aead_ops_nokey = { .sendmsg = aead_sendmsg_nokey, .sendpage = aead_sendpage_nokey, .recvmsg = aead_recvmsg_nokey, - .poll = af_alg_poll, + .poll_mask = af_alg_poll_mask, }; static void *aead_bind(const char *name, u32 type, u32 mask) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 494c99cbe48f..e5463cc0821e 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -212,7 +212,7 @@ static struct proto_ops algif_skcipher_ops = { .sendmsg = skcipher_sendmsg, .sendpage = af_alg_sendpage, .recvmsg = skcipher_recvmsg, - .poll = af_alg_poll, + .poll_mask = af_alg_poll_mask, }; static int skcipher_check_key(struct socket *sock) @@ -308,7 +308,7 @@ static struct proto_ops algif_skcipher_ops_nokey = { .sendmsg = skcipher_sendmsg_nokey, .sendpage = skcipher_sendpage_nokey, .recvmsg = skcipher_recvmsg_nokey, - .poll = af_alg_poll, + .poll_mask = af_alg_poll_mask, }; static void *skcipher_bind(const char *name, u32 type, u32 mask) diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index a50bdb9d7cfd..ff575671fb2f 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h @@ -244,8 +244,7 @@ ssize_t af_alg_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags); void af_alg_free_resources(struct af_alg_async_req *areq); void af_alg_async_cb(struct crypto_async_request *_req, int err); -__poll_t af_alg_poll(struct file *file, struct socket *sock, - poll_table *wait); +__poll_t af_alg_poll_mask(struct socket *sock, __poll_t events); struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, unsigned int areqlen); int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, -- 2.14.2