Re: JFS compilation fix [was Re: Linux 2.6.7]

From: Dave Kleikamp
Date: Wed Jun 16 2004 - 08:00:35 EST


On Wed, 2004-06-16 at 03:07, Tomas Szepe wrote:
> Here's a trivial patch to fix JFS compilation in 2.6.7. The error
> only happens in specific configs -- one such config can be found here:
> http://www.pinerecords.com/kala/_nonpub/.config.louise26

I don't know why gcc-3.2.2 doesn't complain about this one, as I have
compiled this numerous times.

Your patch has an unnecessary include of jfs_dtree.h. jfs_dtree.h is
included by jfs_inline.h, and is not needed in jfs_dtree.c.

> I don't have the time to narrow the problem down to the config
> entry that gets jfs_dtree.c to include jfs_dtree.h (jfs_dtree.c
> itself doesn't have any relevat ifdefs).

My guess is the config entry is CONFIG_JFS_FS. :^)

Here's the patch without the unneeded include:
----------------------------------------------
JFS: move declaration of temp_table to beginning of block

Signed-off-by: Dave Kleikamp <shaggy@xxxxxxxxxxxxxx>

diff -urp linux-2.6.7/fs/jfs/jfs_dtree.c linux/fs/jfs/jfs_dtree.c
--- linux-2.6.7/fs/jfs/jfs_dtree.c 2004-06-16 07:38:20.244688936 -0500
+++ linux/fs/jfs/jfs_dtree.c 2004-06-16 07:46:38.210986552 -0500
@@ -374,6 +374,8 @@ static u32 add_index(tid_t tid, struct i
return index;
}
if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) {
+ struct dir_table_slot temp_table[12];
+
/*
* It's time to move the inline table to an external
* page and begin to build the xtree
@@ -385,7 +387,6 @@ static u32 add_index(tid_t tid, struct i
* Save the table, we're going to overwrite it with the
* xtree root
*/
- struct dir_table_slot temp_table[12];
memcpy(temp_table, &jfs_ip->i_dirtable, sizeof(temp_table));

/*

--
David Kleikamp
IBM Linux Technology Center

-
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/