From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752293AbdEMIfC (ORCPT ); Sat, 13 May 2017 04:35:02 -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 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-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)