Skip to content

Commit

Permalink
kcmp: fs/epoll: wrap kcmp code with CONFIG_CHECKPOINT_RESTORE
Browse files Browse the repository at this point in the history
kcmp syscall is build iif CONFIG_CHECKPOINT_RESTORE is selected, so wrap
appropriate helpers in epoll code with the config to build it
conditionally.

Link: http://lkml.kernel.org/r/20170513083456.GG1881@uranus.lan
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Andrew Morton <akpm@linuxfoundation.org>
Cc: Andrey Vagin <avagin@openvz.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Cyrill Gorcunov authored and Linus Torvalds committed Jul 12, 2017
1 parent 0791e36 commit 92ef6da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@ static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)
return epir;
}

#ifdef CONFIG_CHECKPOINT_RESTORE
static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long toff)
{
struct rb_node *rbp;
Expand Down Expand Up @@ -1118,6 +1119,7 @@ struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd,

return file_raw;
}
#endif /* CONFIG_CHECKPOINT_RESTORE */

/*
* This is the callback that is passed to the wait queue wakeup
Expand Down
2 changes: 2 additions & 0 deletions include/linux/eventpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 92ef6da

Please sign in to comment.