Skip to content

Commit

Permalink
kmemtrace, fs: fix linux/fdtable.h header file dependencies
Browse files Browse the repository at this point in the history
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@cs.helsinki.fi>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: paulmck@linux.vnet.ibm.com
LKML-Reference: <1237898630.25315.83.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Apr 3, 2009
1 parent 76791ab commit 21e5445
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/fdtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 21e5445

Please sign in to comment.