kzalloc conversion in fs/udf
Subsystems (2)
PATCH 1/1 kzalloc conversion in fs/udf
hi,
this converts fs/udf to kzalloc() usage.
compile tested with make allyesconfig
Signed-off-by Eric Sesterhenn <[email protected]>
fs/udf/ialloc.c renamed from fs/udf/ialloc.c.orig +2 -4
@@ -129,14 +129,12 @@ struct inode * udf_new_inode (struct ino {UDF_I_EFE (inode) =1 ;UDF_UPDATE_UDFREV (inode->i_sb,UDF_VERS_USE_EXTENDED_FE ); -UDF_I_DATA (inode) =kmalloc (inode->i_sb->s_blocksize -sizeof (struct extendedFileEntry ),GFP_KERNEL ); -memset (UDF_I_DATA (inode),0x00 , inode->i_sb->s_blocksize -sizeof (struct extendedFileEntry )); +UDF_I_DATA (inode) =kzalloc (inode->i_sb->s_blocksize -sizeof (struct extendedFileEntry ),GFP_KERNEL ); } else {UDF_I_EFE (inode) =0 ; -UDF_I_DATA (inode) =kmalloc (inode->i_sb->s_blocksize -sizeof (struct fileEntry ),GFP_KERNEL ); -memset (UDF_I_DATA (inode),0x00 , inode->i_sb->s_blocksize -sizeof (struct fileEntry )); +UDF_I_DATA (inode) =kzalloc (inode->i_sb->s_blocksize -sizeof (struct fileEntry ),GFP_KERNEL ); }if (UDF_QUERY_FLAG (inode->i_sb,UDF_FLAG_USE_AD_IN_ICB ))UDF_I_ALLOCTYPE (inode) =ICBTAG_FLAG_AD_IN_ICB ;
fs/udf/super.c renamed from fs/udf/super.c.orig +1 -2
@@ -1493,11 +1493,10 @@ static int udf_fill_super(struct super_b uopt.gid =-1 ; uopt.umask =0 ; - sbi =kmalloc (sizeof (struct udf_sb_info ),GFP_KERNEL ); + sbi =kzalloc (sizeof (struct udf_sb_info ),GFP_KERNEL );if (!sbi)return -ENOMEM ; sb->s_fs_info = sbi; -memset (UDF_SB (sb),0x00 ,sizeof (struct udf_sb_info ));init_MUTEX (&sbi->s_alloc_sem);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors