X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fsysv%2Fsuper.c;h=6f9707a1b95438312b27a2e32e0bdcbf557244ac;hb=197cd65accc6a274dabcd81f4811ba5d9a4856df;hp=e92b991e6dda0fff10cb4ba5211a6b995a2ce153;hpb=4bbf7bc4c7bf1c80ec3c942fa5f1b6e6fa67dd99;p=linux-2.6 diff --git a/fs/sysv/super.c b/fs/sysv/super.c index e92b991e6d..6f9707a1b9 100644 --- a/fs/sysv/super.c +++ b/fs/sysv/super.c @@ -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; @@ -506,16 +499,17 @@ failed: /* Every kernel module contains stuff like this. */ -static struct super_block *sysv_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data) +static int sysv_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data, struct vfsmount *mnt) { - return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super); + return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super, + mnt); } -static struct super_block *v7_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data) +static int v7_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data, struct vfsmount *mnt) { - return get_sb_bdev(fs_type, flags, dev_name, data, v7_fill_super); + return get_sb_bdev(fs_type, flags, dev_name, data, v7_fill_super, mnt); } static struct file_system_type sysv_fs_type = { @@ -534,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;