Re: [GIT PULL] Squashfs updates for 2.6.34

From: Linus Torvalds
Date: Wed Mar 03 2010 - 22:50:03 EST

On Thu, 4 Mar 2010, Phillip Lougher wrote:
> In my defence with these patches I was trying for the best solution while
> touching as little of the mess as possible. As that's not acceptable, I'll
> go away and try and fix some of the mess, before trying for another merge.

I know, I understand. The whole thing is messy as hell, I just don't want
that mess to spread even more.

Let's ask Peter for help. He's been involved with that whole crazy init
loader decompressor thing.

Peter, see the thread and my unhappiness on lkml (if you don't have any
other archives, see for example

That whole crazy "let's hide a crappy malloc implementation in a header
file, and then make things depend on '#ifdef STATIC'" just makes me puke.
And I'm sure Phillip has been gouging his eyes out too, while he was
spreading it out into those _new_ crazy header file fragments for each

So rather than have those crazy header file tricks, can we just add a
kmalloc() _library_ file for the crazy bootloader crud, so that the
bootloader could just share header files with the regular kernel, and not
do that crazy thing?

It's insane having that malloc() implementation, and those STATIC games,
in a header file, and the games we play with "error()" sometimes being a
function pointer and sometimes being a function. Crazy, crazy.

So Phillip split up these things:

#ifdef STATIC
/* Code active when included from pre-boot environment: */
#define INIT
/* Compile for initramfs/initrd code only */
#define INIT __init
static void(*error)(char *m);

and I refuse to see three new copies of that disgusting thing (bunzip,
inflate, lzma). So I'd really _really_ want for the pre-boot environment
to have that same __init declaration, and the _same_ indirect error()
handler model, so that we don't have this kind of thing spreading.

It was ugly enough in <compress/mm.h> (which really should be nuked from
orbit - it's the only way to be sure), but when I see it spreading, I go
into full zombie-attack mode, and want to start up the chainsaw and run
around naked.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at