[tip:tracing/kmemtrace-v2] kmemtrace, fs: fix linux/fdtable.h header file dependencies

From: Ingo Molnar
Date: Fri Apr 03 2009 - 06:36:34 EST


Commit-ID: 21e5445928af0d80f7cf803a77f2b65e9e147890
Gitweb: http://git.kernel.org/tip/21e5445928af0d80f7cf803a77f2b65e9e147890
Author: Ingo Molnar <mingo@xxxxxxx>
AuthorDate: Wed, 25 Mar 2009 16:29:05 +0100
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Fri, 3 Apr 2009 12:13:03 +0200

kmemtrace, fs: fix linux/fdtable.h header file dependencies

Impact: cleanup

We want to remove percpu.h from rcupdate.h (for upcoming kmemtrace
changes), but this is not possible currently without breaking the
build because fdtable.h has an implicit include file dependency: it
uses __init does not include init.h.

This can cause build failures on non-x86 architectures:

/home/mingo/tip/include/linux/fdtable.h:66: error: expected '=', ',',
';', 'asm' or '__attribute__' before 'files_defer_init'
make[2]: *** [fs/locks.o] Error 1

We got this header included indirectly via rcupdate.h's percpu.h
inclusion - but if that is not there the build will break.

Fix it.

Cc: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@xxxxxxxxxxx>
Cc: paulmck@xxxxxxxxxxxxxxxxxx
LKML-Reference: <1237898630.25315.83.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
include/linux/fdtable.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 09d6c5b..a2ec74b 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -5,12 +5,14 @@
#ifndef __LINUX_FDTABLE_H
#define __LINUX_FDTABLE_H

-#include <asm/atomic.h>
#include <linux/posix_types.h>
#include <linux/compiler.h>
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
#include <linux/types.h>
+#include <linux/init.h>
+
+#include <asm/atomic.h>

/*
* The default fd array needs to be at least BITS_PER_LONG,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/