Merge ../linux-2.6-watchdog-mm
[pandora-kernel.git] / fs / sysv / super.c
index 876639b..6f9707a 100644 (file)
@@ -358,21 +358,15 @@ static int sysv_fill_super(struct super_block *sb, void *data, int silent)
        unsigned long blocknr;
        int size = 0, i;
        
-       if (1024 != sizeof (struct xenix_super_block))
-               panic("Xenix FS: bad superblock size");
-       if (512 != sizeof (struct sysv4_super_block))
-               panic("SystemV FS: bad superblock size");
-       if (512 != sizeof (struct sysv2_super_block))
-               panic("SystemV FS: bad superblock size");
-       if (500 != sizeof (struct coh_super_block))
-               panic("Coherent FS: bad superblock size");
-       if (64 != sizeof (struct sysv_inode))
-               panic("sysv fs: bad inode size");
+       BUILD_BUG_ON(1024 != sizeof (struct xenix_super_block));
+       BUILD_BUG_ON(512 != sizeof (struct sysv4_super_block));
+       BUILD_BUG_ON(512 != sizeof (struct sysv2_super_block));
+       BUILD_BUG_ON(500 != sizeof (struct coh_super_block));
+       BUILD_BUG_ON(64 != sizeof (struct sysv_inode));
 
-       sbi = kmalloc(sizeof(struct sysv_sb_info), GFP_KERNEL);
+       sbi = kzalloc(sizeof(struct sysv_sb_info), GFP_KERNEL);
        if (!sbi)
                return -ENOMEM;
-       memset(sbi, 0, sizeof(struct sysv_sb_info));
 
        sbi->s_sb = sb;
        sbi->s_block_base = 0;
@@ -453,10 +447,9 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent)
        if (64 != sizeof (struct sysv_inode))
                panic("sysv fs: bad i-node size");
 
-       sbi = kmalloc(sizeof(struct sysv_sb_info), GFP_KERNEL);
+       sbi = kzalloc(sizeof(struct sysv_sb_info), GFP_KERNEL);
        if (!sbi)
                return -ENOMEM;
-       memset(sbi, 0, sizeof(struct sysv_sb_info));
 
        sbi->s_sb = sb;
        sbi->s_block_base = 0;
@@ -535,9 +528,6 @@ static struct file_system_type v7_fs_type = {
        .fs_flags       = FS_REQUIRES_DEV,
 };
 
-extern int sysv_init_icache(void) __init;
-extern void sysv_destroy_icache(void);
-
 static int __init init_sysv_fs(void)
 {
        int error;