From patchwork Sat May 13 08:34:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyrill Gorcunov X-Patchwork-Id: 9725047 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 DBCB8601E7 for ; Sat, 13 May 2017 08:35:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C66AA288CA for ; Sat, 13 May 2017 08:35:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B761A288CF; Sat, 13 May 2017 08:35:29 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 EA109288CA for ; Sat, 13 May 2017 08:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbdEMIfB (ORCPT ); Sat, 13 May 2017 04:35:01 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:32942 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbdEMIfA (ORCPT ); Sat, 13 May 2017 04:35:00 -0400 Received: by mail-lf0-f68.google.com with SMTP id q70so1717349lfi.0; Sat, 13 May 2017 01:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=089YjrRu3dmdGbVGnNbigU7LWmCgmc9NPsS4r72sMUQ=; b=eHRV4zO8kMYCYPkeZhrjgVxoggJ7/mEaclSBBrOUF5Z2KpNwiudh1PeCGwhOfl1LVp XduMocYbPnXcJHGwfeW5SPfYVeCUwHHTYX+wLPfzPl4GKL1QVUc5CWcwB00jLLXDidCU ur7ZeHkdNNaAnHbwqjf/pOAiwoZ9dMG2oIXxWD4lgVZaZvl0UZ5iYpdISqDF4WvuZ6wf IEm4J/hmjBnr5RzwwtYHMwZhcWGgPBUa20eO8o34/nOL0IwqDQO1QfY4S90roQcCjTGg J6S1JVk7K/6gLGQEZdW0aDEZjbXMUvEpk+ccmEjGbIkP6Co6QrVxvhNo39Xhsr2n6jM6 wH5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=089YjrRu3dmdGbVGnNbigU7LWmCgmc9NPsS4r72sMUQ=; b=fRBsZJM0p0rHt/h1HAGAUDLG2PFvTEnd8728480lzPzAR0lU1dkr37uegESQIGDQlE MgoU86bSNQb9FVSWZLSdZtBp9jpX89lZINLDJlugU1hI6SEatYGEYRyIbbG7o3qQZM0h rp1UAEH/xFq+z1JUSfZyebeM7DENS5k/bhLzcZIvnNPNTdTNtSfwFXqpuKcQ1GJK4Inu o3PCmqZwRwTflC9b3pg2c1W1kzF3iewDv5zCweEOzwqFYn1y2otrmoXITcULHPDnYXTu FRHFdrgnd/tyUAS9fhz+kyPK52VD3I49jaioDqiXoAv64HxRZJF+/zwoq24RcQrlUb1b lwSw== X-Gm-Message-State: AODbwcAunwJyOW5ykh7NkqtlYN4FjDhVX1GNNmKwjwv5WeB9g3r/vtCt PHLOrqiqBdrSYA== X-Received: by 10.46.84.68 with SMTP id y4mr2971910ljd.20.1494664498250; Sat, 13 May 2017 01:34:58 -0700 (PDT) Received: from uranus.localdomain ([5.18.237.75]) by smtp.gmail.com with ESMTPSA id v13sm970842lfi.60.2017.05.13.01.34.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 01:34:57 -0700 (PDT) Received: by uranus.localdomain (Postfix, from userid 1000) id 7D7E02492B; Sat, 13 May 2017 11:34:56 +0300 (MSK) Date: Sat, 13 May 2017 11:34:56 +0300 From: Cyrill Gorcunov To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Cc: viro@zeniv.linux.org.uk, akpm@linuxfoundation.org, avagin@virtuozzo.com, xemul@virtuozzo.com, mtk.manpages@gmail.com, avagin@openvz.org, jbaron@akamai.com, luto@amacapital.net Subject: [PATCH linux-next] kcmp: fs/epoll -- Wrap kcmp code with CONFIG_CHECKPOINT_RESTORE Message-ID: <20170513083456.GG1881@uranus.lan> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) 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 kcmp syscall is build iif CONFIG_CHECKPOINT_RESTORE is selected, so wrap appropriate helpers in epoll code with the config to build it conditionally. Signed-off-by: Cyrill Gorcunov Reported-by: Andrew Morton CC: Andrey Vagin CC: Al Viro CC: Pavel Emelyanov CC: Michael Kerrisk CC: Jason Baron CC: Andy Lutomirski --- fs/eventpoll.c | 2 ++ include/linux/eventpoll.h | 2 ++ 2 files changed, 4 insertions(+) Index: linux-ml.git/fs/eventpoll.c =================================================================== --- linux-ml.git.orig/fs/eventpoll.c +++ linux-ml.git/fs/eventpoll.c @@ -1077,6 +1077,7 @@ static struct epitem *ep_find(struct eve return epir; } +#ifdef CONFIG_CHECKPOINT_RESTORE static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long toff) { struct rb_node *rbp; @@ -1118,6 +1119,7 @@ struct file *get_epoll_tfile_raw_ptr(str return file_raw; } +#endif /* CONFIG_CHECKPOINT_RESTORE */ /* * This is the callback that is passed to the wait queue wakeup Index: linux-ml.git/include/linux/eventpoll.h =================================================================== --- linux-ml.git.orig/include/linux/eventpoll.h +++ linux-ml.git/include/linux/eventpoll.h @@ -23,7 +23,9 @@ struct file; #ifdef CONFIG_EPOLL +#ifdef CONFIG_CHECKPOINT_RESTORE struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, unsigned long toff); +#endif /* Used to initialize the epoll bits inside the "struct file" */ static inline void eventpoll_init_file(struct file *file)