From patchwork Sun Jun 17 08:31:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 10468661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 19E3C6028E for ; Sun, 17 Jun 2018 08:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09916289DA for ; Sun, 17 Jun 2018 08:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F03C52893F; Sun, 17 Jun 2018 08:31:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85C5A2893F for ; Sun, 17 Jun 2018 08:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932642AbeFQIbs (ORCPT ); Sun, 17 Jun 2018 04:31:48 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:35758 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbeFQIbr (ORCPT ); Sun, 17 Jun 2018 04:31:47 -0400 Received: by mail-wr0-f175.google.com with SMTP id l10-v6so13755981wrn.2 for ; Sun, 17 Jun 2018 01:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=qbVFzHi6wmBLzOp1euCgs3b+X8+XmARsxoSNjosO82Y=; b=A4BIMjPkLTOVmwOnG9FvF2NTNCXZ0KdPo5zS3ZUzQV3hdYgTsoBuypIxe+rHXrSvyx y/wxZMsL1SYBTjm5vER6PZnPpTdWJfW/YsdjuYDOCDlm3QR9tjYIlhL46D34USeyM8U+ jWDL9VP1tYILa33FbdGKXWpfLQ/QINEQIRrrX4OCLGrvN2iORHA9fv3SsEs1JtuRAG3h SwBKuvVyCMk9kt0kkNmcbbtxkSSsan3eXpEGs2QXLOH7ue5rdHl4eJNZekczzxqBKLp1 ABsLVlCGOuMcINy5LRVnRRSQKeboMHMP2IFMQTQuj1g+bO35tePzZHzqwPx7NonoYrZ8 fN+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qbVFzHi6wmBLzOp1euCgs3b+X8+XmARsxoSNjosO82Y=; b=tMZ+AvPzSXz8lwnTq2Zixn4DriJnnb69tLUalcLwr/n5bf6qnLYV8LB3nmekQYGZJ5 2a0v69YV6/A73+GHLHsuUpSVdjr0TgpzPWgdLXn88azZE0H/MvgDeoQLmt4/A1tphpzW RpI8MxcB3kImlsCS/lfCAYR9Bw0Nv5KZa8HIFVXIMvMW25u0YAkZh6SqFwRuczhbKoPo kwcqxbg25731Gpo/Q1o6n9qhqyrI/q/TUNQSfhLdvCrCJQfjKRrgqFdQSHcVBJsKuhq6 kYlzE+3AmnqPaUXG6VOEEBfch5njdKVNccP44/fBaAst5zo1NdbWyFNpIg/58H9S82v/ 3xRw== X-Gm-Message-State: APt69E1LRaPojnB4V67m/0t69in0KB0u9mrraj/sRExT7DKCP2KAyoIl TKXh5dMRit8hrFxsygKGdVelFw== X-Google-Smtp-Source: ADUXVKLV3VuG6m1H1r8g5wmcS4Z0M1DAnocAtV9n5Z3ox7R8oD1HPM+Jj+7/lkDv7sJ3WoXbBXIxpA== X-Received: by 2002:adf:a851:: with SMTP id l75-v6mr6514598wrc.140.1529224305621; Sun, 17 Jun 2018 01:31:45 -0700 (PDT) Received: from avi.cloudius-systems.com (system.cloudius-systems.com. [199.203.229.89]) by smtp.gmail.com with ESMTPSA id c11-v6sm12335454wri.49.2018.06.17.01.31.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Jun 2018 01:31:44 -0700 (PDT) From: Avi Kivity To: Alexander Viro Cc: hch@lst.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] Revert "eventfd: only return events requested in poll_mask()" Date: Sun, 17 Jun 2018 11:31:41 +0300 Message-Id: <20180617083141.26543-1-avi@scylladb.com> X-Mailer: git-send-email 2.14.4 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 4d572d9f46507be8cfe326aa5bc3698babcbdfa7. It is superceded by the more general 2739b807b0885a09996659be82f813af219c7360 ("aio: only return events requested in poll_mask() for IOCB_CMD_POLL"). Unfortunately, hch nacked it on the bug report rather than on the patch itself, so it was picked up. --- fs/eventfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index ceb1031f1cac..61c9514da5e9 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -154,15 +154,15 @@ static __poll_t eventfd_poll_mask(struct file *file, __poll_t eventmask) * eventfd_poll returns 0 */ count = READ_ONCE(ctx->count); if (count > 0) - events |= (EPOLLIN & eventmask); + events |= EPOLLIN; if (count == ULLONG_MAX) events |= EPOLLERR; if (ULLONG_MAX - 1 > count) - events |= (EPOLLOUT & eventmask); + events |= EPOLLOUT; return events; } static void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)