diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2017-07-12 17:34:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-12 19:26:01 -0400 |
commit | 92ef6da3d06ff551a86de41ae37df9cc4b58d7a0 (patch) | |
tree | f782a386f948c8b480f00935f13009673c764327 | |
parent | 0791e3644e5ef21646fe565b9061788d05ec71d4 (diff) |
kcmp: fs/epoll: wrap kcmp code with CONFIG_CHECKPOINT_RESTORE
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>
-rw-r--r-- | fs/eventpoll.c | 2 | ||||
-rw-r--r-- | include/linux/eventpoll.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index e7e9901c3790..e767e4389cb1 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -1077,6 +1077,7 @@ static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd) | |||
1077 | return epir; | 1077 | return epir; |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
1080 | static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long toff) | 1081 | static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long toff) |
1081 | { | 1082 | { |
1082 | struct rb_node *rbp; | 1083 | struct rb_node *rbp; |
@@ -1118,6 +1119,7 @@ struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, | |||
1118 | 1119 | ||
1119 | return file_raw; | 1120 | return file_raw; |
1120 | } | 1121 | } |
1122 | #endif /* CONFIG_CHECKPOINT_RESTORE */ | ||
1121 | 1123 | ||
1122 | /* | 1124 | /* |
1123 | * This is the callback that is passed to the wait queue wakeup | 1125 | * This is the callback that is passed to the wait queue wakeup |
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index d8625d214ea7..2f14ac73d01d 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -23,7 +23,9 @@ struct file; | |||
23 | 23 | ||
24 | #ifdef CONFIG_EPOLL | 24 | #ifdef CONFIG_EPOLL |
25 | 25 | ||
26 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
26 | struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, unsigned long toff); | 27 | struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, unsigned long toff); |
28 | #endif | ||
27 | 29 | ||
28 | /* Used to initialize the epoll bits inside the "struct file" */ | 30 | /* Used to initialize the epoll bits inside the "struct file" */ |
29 | static inline void eventpoll_init_file(struct file *file) | 31 | static inline void eventpoll_init_file(struct file *file) |