Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4564523ybi; Tue, 11 Jun 2019 08:40:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtctkGIafLHvk5xuLNdcJzAp6GL4K732R97yO7skwyXQAREMe99wcIUkYm9jrO89NccVcG X-Received: by 2002:a17:902:6903:: with SMTP id j3mr2040049plk.247.1560267631838; Tue, 11 Jun 2019 08:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560267631; cv=none; d=google.com; s=arc-20160816; b=gc7kIwPXWQE7kzGdWnlzSEvFNBD+cgmpAu74NNsKKQCsg4azCXD2DrOfIKY7LfRY0+ H6rbpUqeSkgvp6IhQY0n6DXXXBOAGQDX7GbMd3THDT3iQ+Alx4qPhXp0wSBvQZrJfRJS 2XS1Dc9GaT0ycHJQwOnbmtoaiBgdP3qLRnxLsamrGwg3vPt1LnnStOqc9EeRhZD/QA/e VKucuF/MfvxQhmpabcOFTzWs4jss4gx5CXgZf0ywdnqXFwNSN5boNY9Gg+AX5VGR2Hx/ tduLHRoLzEWfMMu3Y9/XrF0z6HdgEcJT7efOh3/9QPkucocT2Jq/o1eAvI9l05xF7hOj kUFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=5/7l7kXE3QpKJG3rRR6/HPyF0ZI65DjLiULhqMVaR8M=; b=Bc+MxjvWMlwjsZd9q0Hmekg/uAfKxYlTwphCPCX3NpwEAFxKCh+sufaWMzKeuUGoou O9m5VAuYcWjybncHxW4F8glJB3Xg8ZDUr2V9k1Gd0fYRrJYRs2je1v+zvXA1Ub0D371i O6JPv7J++VX3uaFp9GP/I2XgbF6D0eN3F9X8jPvSsLGCN3wS90L9K1yDpBmLcJD9yAjb WMt8ukDiERywjhORR+5yFEDbqAxtRQajZbrNKKYl4wg63uDD2FUYNajGjFVPgDknNNCT yesJussehSi77WD0M3xyByojtobzz/RR7OdROpfRMhMcPKuUSWLWS76c+ThLifGDk2A9 HMXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 h21si3065638pgv.102.2019.06.11.08.40.16; Tue, 11 Jun 2019 08:40:31 -0700 (PDT) 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; 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 S2391606AbfFKOzK (ORCPT + 99 others); Tue, 11 Jun 2019 10:55:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:52400 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391563AbfFKOzI (ORCPT ); Tue, 11 Jun 2019 10:55:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1EC25AD5D; Tue, 11 Jun 2019 14:55:07 +0000 (UTC) From: Roman Penyaev Cc: Roman Penyaev , Andrew Morton , Al Viro , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 01/14] epoll: move private helpers from a header to the source Date: Tue, 11 Jun 2019 16:54:45 +0200 Message-Id: <20190611145458.9540-2-rpenyaev@suse.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190611145458.9540-1-rpenyaev@suse.de> References: <20190611145458.9540-1-rpenyaev@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Those helpers will access private eventpoll structure in future patches, so keep those helpers close to callers. Nothing important here. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- fs/eventpoll.c | 13 +++++++++++++ include/uapi/linux/eventpoll.h | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 38d2e8a29f0d..50bb99e98872 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -460,6 +460,19 @@ static inline void ep_set_busy_poll_napi_id(struct epitem *epi) #endif /* CONFIG_NET_RX_BUSY_POLL */ +#ifdef CONFIG_PM_SLEEP +static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) +{ + if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) + epev->events &= ~EPOLLWAKEUP; +} +#else +static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) +{ + epev->events &= ~EPOLLWAKEUP; +} +#endif /* CONFIG_PM_SLEEP */ + /** * ep_call_nested - Perform a bound (possibly) nested call, by checking * that the recursion limit is not exceeded, and that diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h index 8a3432d0f0dc..39dfc29f0f52 100644 --- a/include/uapi/linux/eventpoll.h +++ b/include/uapi/linux/eventpoll.h @@ -79,16 +79,4 @@ struct epoll_event { __u64 data; } EPOLL_PACKED; -#ifdef CONFIG_PM_SLEEP -static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) -{ - if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) - epev->events &= ~EPOLLWAKEUP; -} -#else -static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) -{ - epev->events &= ~EPOLLWAKEUP; -} -#endif #endif /* _UAPI_LINUX_EVENTPOLL_H */ -- 2.21.0