[Devel] Re: [PATCH] c/r: fix broken compilation for architectures that don't support c/r
Serge E. Hallyn
serue at us.ibm.com
Wed Feb 10 12:32:59 PST 2010
Quoting Oren Laadan (orenl at cs.columbia.edu):
>
>
> Serge E. Hallyn wrote:
> >Quoting Oren Laadan (orenl at cs.columbia.edu):
> >>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 at cs.columbia.edu>
> >>---
> >> 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
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list