#31 I can't compile squashfs with the last 2.6.27-rc3


Hi guys,

I'm using squashfs3.3 plus this patch [1] into the last kernel 2.6.27-rc3. Unfortunately there are errors due to changes into VFS, see the compile log below:

LD fs/squashfs/built-in.o
CC [M] fs/squashfs/inode.o
fs/squashfs/inode.c: In function 'squashfs_export_iget':
fs/squashfs/inode.c:654: error: implicit declaration of function 'd_alloc_anon'
fs/squashfs/inode.c:654: warning: assignment makes pointer from integer without a cast
fs/squashfs/inode.c: In function 'init_inodecache':
fs/squashfs/inode.c:2201: warning: passing argument 5 of 'kmem_cache_create' from incompatible pointer type
make[2]: *** [fs/squashfs/inode.o] Error 1
make[1]: *** [fs/squashfs] Error 2
make: *** [fs] Error 2

Is there a patch set to fix this issue?

Best Regards!

[1] http://sourceforge.net/tracker/download.php?group_id=63835&atid=505341&file_id=274755&aid=1912192


  • Nobody/Anonymous

    Logged In: NO

    I've got to compile it under 2.6.27-rc3, but causes an oops when trying to use it.

    For the first error: There must be something weird with your kernel sources, d_alloc_anon is still there
    in fs/dcache.c and the declaration is also included via linux/fs.h.

    The second warning is caused by changeset 51cc50685a4275c6a02653670af9f108a64e01cf and probably causes
    the oops (didn't test it yet). It can be easily fixed by:
    --- squashfs3.3.patch
    +++ squashfs3.3.patch
    @@ -2235,7 +2235,7 @@
    -+static void init_once(struct kmem_cache *cachep, void *foo)
    ++static void init_once(void *foo)


  • crncosta

    crncosta - 2008-08-16

    Logged In: YES
    Originator: YES

    Hi Zoltan, thanks for your interest =)

    It seems that d_alloc_anon was removed recently (see this mail):

    By the header comment "d_alloc_anon" and "d_alloc_root" are similar... did you know if it's true?


  • Nobody/Anonymous

    Logged In: NO

    Well, d_alloc_anon is in vanilla 2.6.27-rc3, even in the current git tree.

    I don't know when the referenced patch will be merged into mainline, but
    the fix for it should also be trivial if you look at:


  • Nobody/Anonymous

    Logged In: NO

    Zoltan, thanks again!

    My mistake: I was using the -next tree :P
    I just switch to vanilla and d_alloc_anon already is there.

    About the Oops: I tested here and your patch works fine ;-)
    You should mark this bug as "fixed" or just close as "solved".

    Kind Regards,

  • Phillip Lougher

    Phillip Lougher - 2008-08-20

    Logged In: YES
    Originator: NO

    This is fixed in Squashfs CVS (devel-3_4 branch). Devel-3_4 is currently targeted at linux-next, but there are patches for linux-2.6.27-rc3 and older kernels. See the README file in cvsroot/squashfs/kernel.

    Squashfs CVS normally has fixes for the latest mainline kernel on kernel.org, plus bug fixes and other improvements, and so it's always worth looking there for problems like this. The 3.4 kernel code has a re-written cache which gives up to 20% speed improvement.

    Make sure you use the devel-3_4 branch, currently CVS HEAD is targetted at Squashfs 4.0 which isn't compatible with 3.3 filesystems, and it is still in development anyway.

    There is going to be another release of Squashfs soon because too many people are finding Squashfs 3.3 lacks any patches for the latest kernels :)


  • Phillip Lougher

    Phillip Lougher - 2008-08-20
    • status: open --> open-fixed
  • Phillip Lougher

    Phillip Lougher - 2008-08-21
    • status: open-fixed --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks