]> err.no Git - linux-2.6/blobdiff - fs/hfsplus/super.c
Pull vector-domain into release branch
[linux-2.6] / fs / hfsplus / super.c
index 37afbec8a76127e011862d2a01c65e34e70b789a..6d87a2a9534d4baa56dbd466016106b78d87daa9 100644 (file)
@@ -283,11 +283,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
        struct nls_table *nls = NULL;
        int err = -EINVAL;
 
-       sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL);
+       sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
        if (!sbi)
                return -ENOMEM;
 
-       memset(sbi, 0, sizeof(HFSPLUS_SB(sb)));
        sb->s_fs_info = sbi;
        INIT_HLIST_HEAD(&sbi->rsrc_inodes);
        hfsplus_fill_defaults(sbi);
@@ -381,6 +380,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
                iput(root);
                goto cleanup;
        }
+       sb->s_root->d_op = &hfsplus_dentry_operations;
 
        str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1;
        str.name = HFSP_HIDDENDIR_NAME;
@@ -470,8 +470,7 @@ static void hfsplus_init_once(void *p, struct kmem_cache *cachep, unsigned long
 {
        struct hfsplus_inode_info *i = p;
 
-       if (flags & SLAB_CTOR_CONSTRUCTOR)
-               inode_init_once(&i->vfs_inode);
+       inode_init_once(&i->vfs_inode);
 }
 
 static int __init init_hfsplus_fs(void)