Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2514283ybd; Mon, 24 Jun 2019 07:44:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTxxUQzmma6x1N+JfsbuwvzcNOWzN40n87jbRNZYGhouDOLzWcMc4YIBZfhCj8LtF0zETm X-Received: by 2002:a63:d211:: with SMTP id a17mr33286785pgg.269.1561387466525; Mon, 24 Jun 2019 07:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561387466; cv=none; d=google.com; s=arc-20160816; b=DH22a4kkliKJGMSuG5HHDoBSP7ZS6qx7lOLvsopgp2IeUycEOmqY/Wvi5LLU7aKesC l8VVLKZFay/AVu9zxj+qygcIAj8DWQHlSla0E+xEf41mU0Q9DzUCcIkfW905ByL4LUuU qaOHPBlB8McaXENlcdjvASPzETD9UinzIw5EuDNmOEI5S3teFaOYf6ERzc+9xpB6wXDc +X9LhKRayZjeBkUzVsJOr3IzF9k/JuW/Kw2iEYddLUGwjGgUX16Zg2gDKMWyRMMX5wXC K/CvGHX0LYvbPe4jODmVdyo61bv8aGHDXLCYNq3iFmcfFM/kKgLJ3bgAADYemaRg4RE4 0LDQ== 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=+wJU/HgM72HM5GEp1hRkhqpYEZPDOY2kd+4LWE5itMg=; b=k83NUsvqCwNITIuqFYWpiuniOUKOsT2XrcYmKFCIytLmv6N//674yQNWwZkNuu0hgo DjpxgQPn7czWXPCVjyGiBQSN+RFE1yPb7Of5o2UQDN/oy6cl8nlFxiuSS7LCH2qPRdcW NGO974p4u0iFO/bOgs/PRtv4PbwTnqf1CzeJvXjwKQPvxYrlluh/egBwK9BEF+u+KX55 EVVP4AgNVcd2OVpjIp5BWU4mNpmTvv5L/qPsH2OkHgyv59mhDNEcRWw4ACk4o41UeF7/ XseKVZ1K4eImgEoCpCMd1kK5UB5E75bECfBCh61QAfmlUZGPNcF0CcLnoFvhl25tnlEW JIUg== 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 h128si10299449pgc.499.2019.06.24.07.44.10; Mon, 24 Jun 2019 07:44:26 -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 S1728400AbfFXOmC (ORCPT + 99 others); Mon, 24 Jun 2019 10:42:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:50314 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726396AbfFXOmB (ORCPT ); Mon, 24 Jun 2019 10:42:01 -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 A7811AD72; Mon, 24 Jun 2019 14:42:00 +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 v5 01/14] epoll: move private helpers from a header to the source Date: Mon, 24 Jun 2019 16:41:38 +0200 Message-Id: <20190624144151.22688-2-rpenyaev@suse.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190624144151.22688-1-rpenyaev@suse.de> References: <20190624144151.22688-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 8bc064630be0..622b6c9ef8c9 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