xfs-masters
[Top] [All Lists]

[xfs-masters] [PATCH, XFS] Fix random.h include for non-debug builds

To: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Subject: [xfs-masters] [PATCH, XFS] Fix random.h include for non-debug builds
From: David Chinner <dgc@xxxxxxx>
Date: Wed, 30 Apr 2008 17:11:16 +1000
Cc: David Chinner <dgc@xxxxxxx>, linux-next@xxxxxxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Lachlan McIlroy <lachlan@xxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Linus <torvalds@xxxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
In-reply-to: <20080430164218.9c2bfb1c.sfr@xxxxxxxxxxxxxxxx>
References: <20080430140027.6cd83fd0.sfr@xxxxxxxxxxxxxxxx> <20080430063544.GA108924158@xxxxxxx> <20080430164218.9c2bfb1c.sfr@xxxxxxxxxxxxxxxx>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Wed, Apr 30, 2008 at 04:42:18PM +1000, Stephen Rothwell wrote:
> Hi David,
> 
> On Wed, 30 Apr 2008 16:35:44 +1000 David Chinner <dgc@xxxxxxx> wrote:
> >
> > Ah, I see the problem - a CONFIG_XFS_DEBUG build includes linux/random.h
> > in a debug header file. That's probably why I didn't catch it (I need to
> > check the .config on my build test tree).
> > 
> > I'll get it fixed properly, but in the mean time the include you've got
> > there will suffice...
> 
> Could you make sure something gets sent to Linus pretty quickly as this
> breaks a lot of the powerpc builds at the moment (see
> http://kisskb.ellerman.id.au/kisskb/branch/3/).

It should break anything that builds a non-debug XFS, not just powerpc.

> Or should I do my patch
> up and sent it?

No, the correct patch is below. Linus, can you please apply?

Cheers,

Dave.

---
Include linux/random.h in all builds, not just debug.


Signed-off-by: Dave Chinner <dgc@xxxxxxx>
---
 fs/xfs/linux-2.6/xfs_linux.h |    1 +
 fs/xfs/support/debug.h       |    2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_linux.h
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_linux.h     2008-04-22 
15:06:11.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_linux.h  2008-04-30 16:38:38.754688626 
+1000
@@ -75,6 +75,7 @@
 #include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/spinlock.h>
+#include <linux/random.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
Index: 2.6.x-xfs-new/fs/xfs/support/debug.h
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/support/debug.h   2007-08-02 22:13:10.000000000 
+1000
+++ 2.6.x-xfs-new/fs/xfs/support/debug.h        2008-04-30 16:38:43.518080606 
+1000
@@ -49,8 +49,6 @@ extern void assfail(char *expr, char *f,
 
 #else /* DEBUG */
 
-#include <linux/random.h>
-
 #define ASSERT(expr)   \
        (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
 


<Prev in Thread] Current Thread [Next in Thread>