udf: Compilation fixes
PATCH 1/1 udf: Compilation fixes
Hi,
the patch below makes UDF compile in -mm kernel (against 2.6.24-rc8-mm1).
Please apply.
Honza
Signature · 87 lines
Jan Kara <[email protected]> SUSE Labs, CR --- Make UDF compile - fixes fallout from previous cleanup patches. Signed-off-by: Jan Kara <[email protected]> diff -rupX /home/jack/.kerndiffexclude linux-2.6.24-rc8-mm1-1-udf_fpos_fix/fs/udf/ialloc.c linux-2.6.24-rc8-mm1-2-udf_add_entry_fix/fs/udf/ialloc.c --- linux-2.6.24-rc8-mm1-1-udf_fpos_fix/fs/udf/ialloc.c 2008-01-29 19:20:40.000000000 +0100 +++ linux-2.6.24-rc8-mm1-2-udf_add_entry_fix/fs/udf/ialloc.c 2008-01-29 21:44:14.000000000 +0100 @@ -128,37 +128,39 @@ struct inode *udf_new_inode(struct inode inode->i_gid = current->fsgid; } - UDF_I_LOCATION(inode).logicalBlockNum = block; - UDF_I_LOCATION(inode).partitionReferenceNum = UDF_I_LOCATION(dir).partitionReferenceNum; - inode->i_ino = udf_get_lb_pblock(sb, UDF_I_LOCATION(inode), 0); + iinfo->i_location.logicalBlockNum = block; + iinfo->i_location.partitionReferenceNum = + dinfo->i_location.partitionReferenceNum; + inode->i_ino = udf_get_lb_pblock(sb, iinfo->i_location, 0); if (inode->i_ino == 2094) printk(KERN_ERR "Allocated inode inode 2094\n"); inode->i_blocks = 0; - UDF_I_LENEATTR(inode) = 0; - UDF_I_LENALLOC(inode) = 0; - UDF_I_USE(inode) = 0; + iinfo->i_lenEAttr = 0; + iinfo->i_lenAlloc = 0; + iinfo->i_use = 0; if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_EXTENDED_FE)) { - UDF_I_EFE(inode) = 1; - UDF_UPDATE_UDFREV(inode->i_sb, UDF_VERS_USE_EXTENDED_FE); - UDF_I_DATA(inode) = kzalloc(inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry), GFP_KERNEL); + iinfo->i_efe = 1; + if (UDF_VERS_USE_EXTENDED_FE > sbi->s_udfrev) + sbi->s_udfrev = UDF_VERS_USE_EXTENDED_FE; + iinfo->i_ext.i_data = kzalloc(inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry), GFP_KERNEL); } else { - UDF_I_EFE(inode) = 0; - UDF_I_DATA(inode) = kzalloc(inode->i_sb->s_blocksize - sizeof(struct fileEntry), GFP_KERNEL); + iinfo->i_efe = 0; + iinfo->i_ext.i_data = kzalloc(inode->i_sb->s_blocksize - sizeof(struct fileEntry), GFP_KERNEL); } - if (!UDF_I_DATA(inode)) { + if (!iinfo->i_ext.i_data) { iput(inode); *err = -ENOMEM; mutex_unlock(&sbi->s_alloc_mutex); return NULL; } if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_AD_IN_ICB)) - UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_IN_ICB; + iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB; else if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) - UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_SHORT; + iinfo->i_alloc_type = ICBTAG_FLAG_AD_SHORT; else - UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_LONG; + iinfo->i_alloc_type = ICBTAG_FLAG_AD_LONG; inode->i_mtime = inode->i_atime = inode->i_ctime = - UDF_I_CRTIME(inode) = current_fs_time(inode->i_sb); + iinfo->i_crtime = current_fs_time(inode->i_sb); insert_inode_hash(inode); mark_inode_dirty(inode); mutex_unlock(&sbi->s_alloc_mutex); diff -rupX /home/jack/.kerndiffexclude linux-2.6.24-rc8-mm1-1-udf_fpos_fix/include/linux/udf_fs.h linux-2.6.24-rc8-mm1-2-udf_add_entry_fix/include/linux/udf_fs.h --- linux-2.6.24-rc8-mm1-1-udf_fpos_fix/include/linux/udf_fs.h 2008-01-29 19:20:44.000000000 +0100 +++ linux-2.6.24-rc8-mm1-2-udf_add_entry_fix/include/linux/udf_fs.h 2008-01-29 21:47:08.000000000 +0100 @@ -39,13 +39,13 @@ #ifdef UDFFS_DEBUG #define udf_debug(f, a...) \ - { \ + do { \ printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \ __FILE__, __LINE__, __FUNCTION__); \ printk (f, ##a); \ - } + } while (0) #else -#define udf_debug(f, a...) /**/ +#define udf_debug(f, a...) do { } while (0) #endif #define udf_info(f, a...) \
Quoted 16 lines · On Wed, 30 Jan 2008 16:07:37 +0100 Jan Kara <[email protected]> wrote:
Hi,
the patch below makes UDF compile in -mm kernel (against 2.6.24-rc8-mm1).
Please apply.Honza
Signature · 9 lines
Jan Kara <[email protected]> SUSE Labs, CR --- Make UDF compile - fixes fallout from previous cleanup patches. Signed-off-by: Jan Kara <[email protected]> diff -rupX /home/jack/.kerndiffexclude linux-2.6.24-rc8-mm1-1-udf_fpos_fix/fs/udf/ialloc.c linux-2.6.24-rc8-mm1-2-udf_add_entry_fix/fs/udf/ialloc.c
Please prefer to put not-for-the-changelog text after the "^---" rather than prior to the changelog.
When fixing compile errors and warnings, please always quote the compiler output so we can see what is being fixed.
This patch doesn't apply to my tree and UDF presently compiles OK. And it compiled OK in 2.6.24-rc8-mm1 so I am at a loss to know what's going on here.
Please check http://userweb.kernel.org/~akpm/mmotm/ with your mysteryconfig
and see if we still need any fixes. Beware that this mmotm snapshot is full
of git conflicts which I haven't bothered fixing (because they're different each time I pull the trees). But UDF compiles OK.