Received: by 10.223.176.46 with SMTP id f43csp3333816wra; Mon, 22 Jan 2018 12:17:46 -0800 (PST) X-Google-Smtp-Source: AH8x225hH8+0ckNKJvXLBbYosy6JbBTgr6UeEmO3xqMAGJSOYbnVidY9/FjMSEprPVlIrZP2idVI X-Received: by 10.107.88.4 with SMTP id m4mr125044iob.278.1516652266593; Mon, 22 Jan 2018 12:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516652266; cv=none; d=google.com; s=arc-20160816; b=qh5T9FWYrkQdqHyF51zfn1IhGDC46I568U+0LO7BpQTK9jmKs6g66Vi8S9Jl80mcDv PkNUTNSHrl4uleXB6JFQGvshx20dNuit+qig2LTl/lw0IGMApx3Bn6GFkLfQX3fZhH4t A83Uzsrec9P5mwYf0hmdJwf6vEe5MpQzIR/Zv3ePSeoAQcifAUPheGee95xDEEelsaSM xgBGXpmdXj0NEX8kbsjh5dw+2lkpbtHXcoVAVvYLAqoXvOcAJoCp23T6FCq0EU6x2t/w GCq5RelEms4Rr6JPCQktHThF3q+eFsn/oMam1Fb8ayYaMPKiYkPs0YUobzvdvvm1Lgz+ iGmA== 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=QSYeDZSDQ5JNXFd4jgKkFl9SmIudLLxAIDAWzLwroTg=; b=E+045VZoPHR0joqwfmDn5133kFKl/aAB9Ey2nZtc81yUzwrSyu+v9nyAogncIMrU5m bNqtQXx5hb6EbZe0PBgEeu8ljd+KIiBHgBuMJAX042aljhOBcHyFlO83x5fyjruwDDHC jpI/Mbq/uJqXVGMj6KI5RtefI2Anz2+3jaA+LN5PclmgN1uzbiRbAeU5b3MZ/N8lOt4k RjBm0Rwdc95vDsuEXnJrxbkmdyVcYYHAwwRL6wqKsh1D/mZAlQt29kSekZPK4ebUqHeC Aj20hr0jcZZjivK61oHn3La1pjXobMeiQ7UToIjGNwUWnmEvf+7V8joEVMNA4gFv8BVn rYmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ukdiEGM0; 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 c6si6987273ite.79.2018.01.22.12.17.33; Mon, 22 Jan 2018 12:17:46 -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=ukdiEGM0; 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 S1752052AbeAVUPu (ORCPT + 99 others); Mon, 22 Jan 2018 15:15:50 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:35821 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751972AbeAVUOi (ORCPT ); Mon, 22 Jan 2018 15:14:38 -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=QSYeDZSDQ5JNXFd4jgKkFl9SmIudLLxAIDAWzLwroTg=; b=ukdiEGM0LCjXZWj8eGCI+B2Qa W6E7RlZ4oFFIuCPAJ+vbmyigMDYrvoTWGGKelubYKYAWc9v9Cf8QbZiZNXScsD4sFrZrin/xHQF0K EdabUur7XOMxN1Jn1DclWLau2AMfM8DYDBeq0Ht+2vPw/8tj8jPrAIxmO81cXplZX2tiJDymGTZlY iRD+SBOFAJRN43wa5Ko6XO8tGSnzZIkqLAnxgg+CAZjPDsaxg1HeCtMWwP4wkt+VYtdpoHoULsbxa C5TSaqsStlFoj4H32Mr4GthO2oB/UMFsALSJ3T1IeKlfo3ROKu2ilVyATbkASbGjXJ3RxKJRrtfgT FOTj+EHHA==; 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 1ediUG-0007z9-AE; Mon, 22 Jan 2018 20:14:36 +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 34/36] eventfd: switch to ->poll_mask Date: Mon, 22 Jan 2018 21:12:41 +0100 Message-Id: <20180122201243.31610-35-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 --- fs/eventfd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 6318a9b57e53..2bbbf13cb816 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -114,14 +114,20 @@ static int eventfd_release(struct inode *inode, struct file *file) return 0; } -static __poll_t eventfd_poll(struct file *file, poll_table *wait) +static struct wait_queue_head * +eventfd_get_poll_head(struct file *file, __poll_t events) +{ + struct eventfd_ctx *ctx = file->private_data; + + return &ctx->wqh; +} + +static __poll_t eventfd_poll_mask(struct file *file, __poll_t eventmask) { struct eventfd_ctx *ctx = file->private_data; __poll_t events = 0; u64 count; - poll_wait(file, &ctx->wqh, wait); - /* * All writes to ctx->count occur within ctx->wqh.lock. This read * can be done outside ctx->wqh.lock because we know that poll_wait @@ -341,7 +347,8 @@ static const struct file_operations eventfd_fops = { .show_fdinfo = eventfd_show_fdinfo, #endif .release = eventfd_release, - .poll = eventfd_poll, + .get_poll_head = eventfd_get_poll_head, + .poll_mask = eventfd_poll_mask, .read = eventfd_read, .write = eventfd_write, .llseek = noop_llseek, -- 2.14.2