I built using module-assistant and the Ubuntu 8.04 version of aufs, as
packaged by Julian Andres Klode.  It builds fine without the patch.
With the patch, compile fails on the BUILD_BUG_ON line. This is on
x86_64 architecture.

# m-a -k /usr/src/linux-headers-2.6.24-16-server -l 2.6.24-16-server a-i aufs

Here's the compile error.

/usr/src/modules/aufs/i_op_ren.c: In function ‘aufs_rename’:
/usr/src/modules/aufs/i_op_ren.c:498: error: size of array ‘type name’
is negative

Here's the code that doesn't compile.

int aufs_rename(struct inode *src_dir, struct dentry *src_dentry,
                struct inode *dir, struct dentry *dentry)
{
        int err, do_dt_dstdir, flags;
        aufs_bindex_t bend, bindex;
        struct inode *inode[2], *dirs[2];
        struct aufs_hinode *hgdir[2];
        enum { PARENT, CHILD };
        /* reduce stack space */
        struct {
                struct rename_args a;
                struct au_dtime dt[2][2];
        } *p;
        struct au_wr_dir_args wr_dir_args = {
                //.force_btgt   = -1,
                .add_entry      = 1,
                .do_lock_srcdir = 0,
                //.isdir        = 0
        };

        LKTRTrace("i%lu, %.*s, i%lu, %.*s\n",
                  src_dir->i_ino, AuDLNPair(src_dentry),
                  dir->i_ino, AuDLNPair(dentry));
        IMustLock(src_dir);
        IMustLock(dir);
        inode[DST] = dentry->d_inode;
        if (inode[DST]) {
                IMustLock(inode[DST]);
                igrab(inode[DST]);
        }

        err = -ENOMEM;
        BUILD_BUG_ON(sizeof(*p) > PAGE_SIZE);

------------------------------------------------------------------------------

Reply via email to