* [PATCH] c/r: fix broken compilation for architectures that don't support c/r
@ 2010-02-09 23:54 Oren Laadan
[not found] ` <1265759643-23495-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Oren Laadan @ 2010-02-09 23:54 UTC (permalink / raw)
To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
The include file <linux/checkpoint_hdr.h> itself includes the header
<asm/checkpoint_hdr.h>, which exists only for supported architectures.
Therefore, non c/r specific code must not include it unconditionally,
but only when CONFIG_CHECKPOINT is defined.
Instead, either use include <linux/checkpoint.h>, which take the
necessary precautions (preferred), or explicit test CONFIG_CHECKPOINT.
This patch fixes this in eventfd.c and eventpoll.c, to allow a kernel
with the c/r patches to compile on other architectures.
(Reported by: Christoffer Dall)
Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
---
fs/eventfd.c | 1 -
fs/eventpoll.c | 5 -----
2 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 5259d6e..3277534 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -19,7 +19,6 @@
#include <linux/kref.h>
#include <linux/eventfd.h>
#include <linux/checkpoint.h>
-#include <linux/checkpoint_hdr.h>
struct eventfd_ctx {
struct kref kref;
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index cb286c7..aedaf87 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -38,12 +38,7 @@
#include <asm/io.h>
#include <asm/mman.h>
#include <asm/atomic.h>
-
-#ifdef CONFIG_CHECKPOINT
#include <linux/checkpoint.h>
-#include <linux/checkpoint_hdr.h>
-#include <linux/deferqueue.h>
-#endif
/*
* LOCKING:
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1265759643-23495-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>]
* Re: [PATCH] c/r: fix broken compilation for architectures that don't support c/r [not found] ` <1265759643-23495-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> @ 2010-02-10 18:02 ` Serge E. Hallyn [not found] ` <20100210180256.GD12251-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Serge E. Hallyn @ 2010-02-10 18:02 UTC (permalink / raw) To: Oren Laadan; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): > The include file <linux/checkpoint_hdr.h> itself includes the header > <asm/checkpoint_hdr.h>, which exists only for supported architectures. > > Therefore, non c/r specific code must not include it unconditionally, > but only when CONFIG_CHECKPOINT is defined. > > Instead, either use include <linux/checkpoint.h>, which take the > necessary precautions (preferred), or explicit test CONFIG_CHECKPOINT. > > This patch fixes this in eventfd.c and eventpoll.c, to allow a kernel > with the c/r patches to compile on other architectures. > > (Reported by: Christoffer Dall) > > Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> > --- > fs/eventfd.c | 1 - > fs/eventpoll.c | 5 ----- > 2 files changed, 0 insertions(+), 6 deletions(-) > > diff --git a/fs/eventfd.c b/fs/eventfd.c > index 5259d6e..3277534 100644 > --- a/fs/eventfd.c > +++ b/fs/eventfd.c > @@ -19,7 +19,6 @@ > #include <linux/kref.h> > #include <linux/eventfd.h> > #include <linux/checkpoint.h> > -#include <linux/checkpoint_hdr.h> > > struct eventfd_ctx { > struct kref kref; > diff --git a/fs/eventpoll.c b/fs/eventpoll.c > index cb286c7..aedaf87 100644 > --- a/fs/eventpoll.c > +++ b/fs/eventpoll.c > @@ -38,12 +38,7 @@ > #include <asm/io.h> > #include <asm/mman.h> > #include <asm/atomic.h> > - > -#ifdef CONFIG_CHECKPOINT > #include <linux/checkpoint.h> > -#include <linux/checkpoint_hdr.h> > -#include <linux/deferqueue.h> Where does deferqueue.h get included from, though? Kind of looks like checkpoint_types.h should include that anyway, then we can remove the explicit include from checkpoint{checkpoint,files,restart,sys}.c > -#endif > > /* > * LOCKING: > -- > 1.6.3.3 > > _______________________________________________ > Containers mailing list > Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > https://lists.linux-foundation.org/mailman/listinfo/containers ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20100210180256.GD12251-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] c/r: fix broken compilation for architectures that don't support c/r [not found] ` <20100210180256.GD12251-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2010-02-10 19:59 ` Oren Laadan [not found] ` <4B73102D.1020104-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Oren Laadan @ 2010-02-10 19:59 UTC (permalink / raw) To: Serge E. Hallyn; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA Serge E. Hallyn wrote: > Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): >> The include file <linux/checkpoint_hdr.h> itself includes the header >> <asm/checkpoint_hdr.h>, which exists only for supported architectures. >> >> Therefore, non c/r specific code must not include it unconditionally, >> but only when CONFIG_CHECKPOINT is defined. >> >> Instead, either use include <linux/checkpoint.h>, which take the >> necessary precautions (preferred), or explicit test CONFIG_CHECKPOINT. >> >> This patch fixes this in eventfd.c and eventpoll.c, to allow a kernel >> with the c/r patches to compile on other architectures. >> >> (Reported by: Christoffer Dall) >> >> Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> >> --- >> fs/eventfd.c | 1 - >> fs/eventpoll.c | 5 ----- >> 2 files changed, 0 insertions(+), 6 deletions(-) >> >> diff --git a/fs/eventfd.c b/fs/eventfd.c >> index 5259d6e..3277534 100644 >> --- a/fs/eventfd.c >> +++ b/fs/eventfd.c >> @@ -19,7 +19,6 @@ >> #include <linux/kref.h> >> #include <linux/eventfd.h> >> #include <linux/checkpoint.h> >> -#include <linux/checkpoint_hdr.h> >> >> struct eventfd_ctx { >> struct kref kref; >> diff --git a/fs/eventpoll.c b/fs/eventpoll.c >> index cb286c7..aedaf87 100644 >> --- a/fs/eventpoll.c >> +++ b/fs/eventpoll.c >> @@ -38,12 +38,7 @@ >> #include <asm/io.h> >> #include <asm/mman.h> >> #include <asm/atomic.h> >> - >> -#ifdef CONFIG_CHECKPOINT >> #include <linux/checkpoint.h> >> -#include <linux/checkpoint_hdr.h> >> -#include <linux/deferqueue.h> > > Where does deferqueue.h get included from, though? Oops... will add. Otherwise ok ? > > Kind of looks like checkpoint_types.h should include that anyway, > then we can remove the explicit include from > checkpoint{checkpoint,files,restart,sys}.c It isn't necessary in checkpoint.h because there is only a pointer reference to this deferqueue structure. Oren. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <4B73102D.1020104-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>]
* Re: [PATCH] c/r: fix broken compilation for architectures that don't support c/r [not found] ` <4B73102D.1020104-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> @ 2010-02-10 20:32 ` Serge E. Hallyn 0 siblings, 0 replies; 4+ messages in thread From: Serge E. Hallyn @ 2010-02-10 20:32 UTC (permalink / raw) To: Oren Laadan; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): > > > Serge E. Hallyn wrote: > >Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): > >>The include file <linux/checkpoint_hdr.h> itself includes the header > >><asm/checkpoint_hdr.h>, which exists only for supported architectures. > >> > >>Therefore, non c/r specific code must not include it unconditionally, > >>but only when CONFIG_CHECKPOINT is defined. > >> > >>Instead, either use include <linux/checkpoint.h>, which take the > >>necessary precautions (preferred), or explicit test CONFIG_CHECKPOINT. > >> > >>This patch fixes this in eventfd.c and eventpoll.c, to allow a kernel > >>with the c/r patches to compile on other architectures. > >> > >>(Reported by: Christoffer Dall) > >> > >>Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> > >>--- > >> fs/eventfd.c | 1 - > >> fs/eventpoll.c | 5 ----- > >> 2 files changed, 0 insertions(+), 6 deletions(-) > >> > >>diff --git a/fs/eventfd.c b/fs/eventfd.c > >>index 5259d6e..3277534 100644 > >>--- a/fs/eventfd.c > >>+++ b/fs/eventfd.c > >>@@ -19,7 +19,6 @@ > >> #include <linux/kref.h> > >> #include <linux/eventfd.h> > >> #include <linux/checkpoint.h> > >>-#include <linux/checkpoint_hdr.h> > >> > >> struct eventfd_ctx { > >> struct kref kref; > >>diff --git a/fs/eventpoll.c b/fs/eventpoll.c > >>index cb286c7..aedaf87 100644 > >>--- a/fs/eventpoll.c > >>+++ b/fs/eventpoll.c > >>@@ -38,12 +38,7 @@ > >> #include <asm/io.h> > >> #include <asm/mman.h> > >> #include <asm/atomic.h> > >>- > >>-#ifdef CONFIG_CHECKPOINT > >> #include <linux/checkpoint.h> > >>-#include <linux/checkpoint_hdr.h> > >>-#include <linux/deferqueue.h> > > > >Where does deferqueue.h get included from, though? > > Oops... will add. > > Otherwise ok ? Yup - suppose Matt would know best, but I'm glad to see !CHECKPOINT is being checked :) > >Kind of looks like checkpoint_types.h should include that anyway, > >then we can remove the explicit include from > >checkpoint{checkpoint,files,restart,sys}.c > > It isn't necessary in checkpoint.h because there is only > a pointer reference to this deferqueue structure. Oh, yeah, makes sense. -serge ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-10 20:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-09 23:54 [PATCH] c/r: fix broken compilation for architectures that don't support c/r Oren Laadan
[not found] ` <1265759643-23495-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-10 18:02 ` Serge E. Hallyn
[not found] ` <20100210180256.GD12251-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-10 19:59 ` Oren Laadan
[not found] ` <4B73102D.1020104-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-10 20:32 ` Serge E. Hallyn
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.