nfsd4: use list_move in move_to_confirmed
[safe/jmp/linux-2.6] / fs / sysv / super.c
index e92b991..5a903da 100644 (file)
@@ -332,8 +332,8 @@ static int complete_read_super(struct super_block *sb, int silent, int size)
        sb->s_magic = SYSV_MAGIC_BASE + sbi->s_type;
        /* set up enough so that it can read an inode */
        sb->s_op = &sysv_sops;
-       root_inode = iget(sb,SYSV_ROOT_INO);
-       if (!root_inode || is_bad_inode(root_inode)) {
+       root_inode = sysv_iget(sb, SYSV_ROOT_INO);
+       if (IS_ERR(root_inode)) {
                printk("SysV FS: get root inode failed\n");
                return 0;
        }
@@ -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;